htmlColor does not apply if MuiSvgIcon class is overridden #22688
Labels
component: SvgIcon
The React component.
support: question
Community support but can be turned into an improvement
Current Behavior 😯
I have the following code in my
theme.overrides
:And below is my
SvgIcon
:Now the
htmlColor
props won't work as itApplies to the color attribute to the SVG element.
according to the documentation which doesn't override thecss
thatMuiSvgIcon-root
class applies to thesvg
.Expected Behavior 🤔
If
htmlColor
is provided it should override thecss
color if possible (which I could not find any way yet).Steps to Reproduce 🕹
Steps:
MuiSvgIcon.root
in your theme and set a color.htmlColor
with a different color.svg
color won't change (as expected as html attributes doesn't override css properties).Context 🔦
I wanted all of my icons to be of one same color until I specify one. Currently I have to create a style for every
SvgIcon
I want to have a different color like this:The text was updated successfully, but these errors were encountered: