3 ms·
> colors I'm always amazed when people go through the trouble of adding a light/dark theme switcher rather than just respecting the user's system preference wi
by tasuki 5mo ago
> colors
I'm always amazed when people go through the trouble of adding a light/dark theme switcher rather than just respecting the user's system preference with `prefers-color-scheme`[0].
[0]: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-color-scheme https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/A...
- wonger_ 5mo agoYou can do both, because some people like having per-site color controls. Like I prefer to read prose and literary website content in light mode while keeping my OS in dark mode. Admittedly it's a niche use case.
- zahlman 5mo agoYou can do both. And then you help out people who don't know that they have a meaningful system preference (or maybe all the other sites they visit don't honour it, or maybe their web browser isn't picking it up for some reason).