DEV Community

Discussion on: What is the next big thing in frontend development?

avalander profile image

I dream of browsers that have a setting to browse in "dark mode", i.e., if the user chooses so, the browser would provide by default dark background colours and white text colours for all websites. And CSS selectors that make it easy for web developers to configure the colours for dark and light modes.

Right now, it's up to every site to provide a dark theme, most don't bother, it's not straightforward to implement both, a light and a dark theme (even though CSS variables make it easier nowadays), and many times when the website provides a dark theme and the user selects it, the choice is stored in a cookie, which is far from ideal if you set your browser to remove all cookies on exit.

What I dream is that my browser has a setting that I can enable and will present all websites with a dark theme. The websites could use CSS to override the defaults for the dark mode, with something like this.

body {
    color: #111;
    background: #fff;

body:dark {
    color: #eee;
    background: #333;

And then the browser would use the styles with :dark when the user has the dark mode enabled, but they would get a basic default dark theme even if the CSS doesn't provide any :dark configuration.

niorad profile image
Antonio Radovcic

Seems like it's on the way