Closed alex-page closed 3 years ago
It's worth noting that the core package and Gatsby plugin use a prefixed class selector during hydration, e.g. .theme-ui-dark
To me, this counteracts the philosophy of React—React never reads from the DOM to change its state, you change the state on React’s end, it renders to the VDOM then the DOM is updated. While I think adding functionality to automatically use color modes like #1144 & respecting prefers-color-scheme
in realtime totally make sense, & #979/#982 make Theme UI colors more available in vanilla CSS, I don’t think this is a feature we should support.
@hasparus
Totally agreed!
As mentioned in https://github.com/system-ui/theme-ui/pull/235#discussion_r308298513 it would be nice to have a way to set color modes via a css class.