2 ms·
I get the idea of ios/android apps supporting dark theme, but since when did this concept apply to websites?
by raziel2p 7y ago
I get the idea of ios/android apps supporting dark theme, but since when did this concept apply to websites?
- kroltan 7y agoThrough the prefers-color-scheme CSS media query [1], a draft [2] that is already implemented in mainstream browsers. Websites can write stylesheets specifically for light or dark preferences. Browsers currently derive this information from the operating system's preferences. [1]: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pref... [2]: https://drafts.csswg.org/mediaqueries-5/#prefers-color-scheme https://drafts.csswg.org/mediaqueries-5/#prefers-color-schem...