Element styles - "Only basic state allowed" - How to implement a dark mode now?

Seems like there was a change within the last months that using advanced conditions for element styles is no longer allowed. Previously I used a <Current User’s dark mode is “yes” > condition to change font color and background color depending on the style selected by the user.

image

For new styles, defining such conditions is not possible anymore. I get a message saying: “This state should be basic: hovered, pressed. focused or valid”

image

My app depends on hundreds of custom styles for every element. Why was this limitation introduced? What is the recommended way to implement a Dark Mode?

Thanks
MIchael

Hello! I have spoken with out engineering team, and they have deployed a fix for this, so your dark mode features should now be running as it was before. Please let me know if you have any further questions!

2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.