|
[br]
[br]Web browsers currently handle dark mode in one of two ways. Some of them, like Samsung Browser, simply invert the colors of the web page. This sometimes breaks the site's design, but it works universally. Another approach is to let sites know that dark mode is activated, and let them use an alternative theme. Chrome appears to be joining the latter camp, as the browser's development team announced support the 'prefers-color-scheme' browser feature.[br][br]The prefers-color-scheme feature was first introduced by Apple, and arrived as part of Safari 12.1 on macOS Mojave. It allows sites to define certain styles for dark mode (for example, turning a white background to black), and when the user's operating system switches to dark mode, those styles are automatically activated. Mozilla has also implemented the feature in the upcoming Firefox 67 release.[br][br][br]
[br][br]The Chrome team announced an 'Intent to Ship' for the feature, meaning development has begun. The post also went into detail about how it would work on different platforms:[br][br]
[br][br][br]Hopefully, sites will begin to implement their own dark themes in preparation for Chrome adding this feature. When it arrives, you can check out this demo or my own site to see it in action.[br][br][br][br]#Infinix_India...... |
|