- Joined
- Sep 19, 2018
- Messages
- 4,744
- SL Rez
- 2002
- Joined SLU
- Nov 2003
- SLU Posts
- 35836
The latest release of Chrome has added support for the prefers-color-scheme media query, joining Safari and Firefox that already support it (it is coming to mobile Safari with iOS 13). It provides an elegant way to support light or dark mode based on user preferences:
As someone who turns on dark mode on everything, I appreciate where this is heading.
prefers-color-scheme - CSS: Cascading Style Sheets | MDN
The prefers-color-scheme CSS media feature is used to detect if a user has requested light or dark color themes. A user indicates their preference through an operating system setting (e.g. light or dark mode) or a user agent setting.
developer.mozilla.org
Can I use... Support tables for HTML5, CSS3, etc
caniuse.com
As someone who turns on dark mode on everything, I appreciate where this is heading.