Geeks for your information
Chrome Will Allow Sites to Check Your OS Dark Mode Settings - Printable Version

+- Geeks for your information (https://www.geeks.fyi)
+-- Forum: News (https://www.geeks.fyi/forumdisplay.php?fid=105)
+--- Forum: Browsers News & Tips (https://www.geeks.fyi/forumdisplay.php?fid=109)
+--- Thread: Chrome Will Allow Sites to Check Your OS Dark Mode Settings (/showthread.php?tid=6878)



Chrome Will Allow Sites to Check Your OS Dark Mode Settings - silversurfer - 03 May 19

Quote:Google Chrome and Mozilla Firefox will soon support a new CSS media query called 'prefers-color-scheme' that let's sites know whether you prefer a dark mode, light mode, or have no preference.
 
In a post to Chromium's blink-dev mailing list, Chromium developer Rune Lillesveen has stated that they plan on releasing support for the the prefers-color-scheme media query in Chrome 76. 
 
This media query will allow web sites to see what color preference is configured on visitor's operating system.
 
"Support the media query feature 'prefers-color-scheme' from Media Queries Level 5 to let authors adapt web content to user-selected themes in the OS or browser. For instance by selecting dark instead of light appearance in MacOS. Keywords: 'light', 'dark', 'no-preference'."

Using this query, sites can automatically use a dark mode theme if your OS is configured to use one as well, making the site, browser, and operating synchronized in color preferences.

SOURCE: https://www.bleepingcomputer.com/news/software/chrome-will-allow-sites-to-check-your-os-dark-mode-settings/