[BUG] Perspective Style: Disabled element state not affecting font colour

v8.1.0rc1

Maybe I’m missing something, but I can’t get the font colour of my buttons to change using a element state in my style when the button is disabled.

In the screenshot, the button is disabled with the shown style snippet applied to the textStyle.classes property. The disable state should be a light grey, as in the icon, but it’s still a dark blue.

Just tested this myself and just spotted the issue, if you apply it to the style.classes property this should work. The textstyle.classes applies to the inner div element of the button containing the button’s text - but it’s the parent button that was actually disabled.

image

When I moved it to the style.classes this worked, and as long as you don’t have any classes in textStyle.classes that will overwrite color then your text element div should inherit that colour.

1 Like

Thanks, that works and is more elegant to have all styles defined in the one spot. Not sure why I didn’t try that first… the textStyles must have spoken to my subconscious. I also need to get more acquainted with using the dev tools to help with diagnostics

Now I just need to work out how to stop the hover animation when it’s disabled…

1 Like