How to change color of icons? #60
-
I am changing color like this |
Beta Was this translation helpful? Give feedback.
Answered by
ashley-hunter
May 16, 2023
Replies: 3 comments 2 replies
-
Hi, try instead use CSS and the color property. https://stackblitz.com/edit/angular-adpvfg?file=src%2Fmain.ts |
Beta Was this translation helpful? Give feedback.
0 replies
-
The color input seems to work fine for me: https://stackblitz.com/edit/angular-wjry4u?file=src%2Fmain.ts if you are able to reproduce this not working in stackblitz please raise an issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sure, so I see the icon color is matching the text within the button which suggests the styles setting the color on the button has a higher specificity and is overriding the color.
An easy way to check would be to move the icon out of the button and see if it appears red. If not, it would suggest the color is being set more globally rather than by the button styles.
At worst a workaround would be to set the color on the icon using CSS and add !important, e.g.
<ng-icon style="color: red !important" ...>