3 ms·
Please use `prefers-color-scheme` to respect users' environments and default preferences instead. It's also worth noting that, for some people, this is more tha
by CharlesW 1y ago
Please use `prefers-color-scheme` to respect users' environments and default preferences instead. It's also worth noting that, for some people, this is more than just a cosmetic choice.
- gruez 1y agoFrom TFA: >Automatically setting the theme is a nice touch for most, but accessibility comes first, and if the user has a preference, it's always right to respect their choice. >You can check for users' colour scheme preferences in CSS & JavaScript with the following snippets:
- CharlesW 1y agoI'm glad it's mentioned, but I was trying to say "never do the thing TFA recommends" in a less harsh way, and inadvertently dulled my point.