DEV Community

Discussion on: In 2020, dark or light should be the default theme?

Collapse
 
atan profile image
atan

There's a semi-new prefers-color-scheme CSS feature that allows for detection of the system-selected dark/light mode. As implementations of dark/light modes become more popular, I think using this would solve the issue of operating in a dark environment and being blasted with a bright screen and vice versa.

developer.mozilla.org/en-US/docs/W...

Collapse
 
pioneer profile image
Serge Tarkovski

I totally agree with that, despite it's not supported everywhere. My personal opinion is that the most modern approach is to use a dark theme at night and a light theme at day, switching between them automatically.

Collapse
 
pjeziorowski profile image
Patryk Jeziorowski

That's a very interesting answer. The approach with prefers-color-scheme seems very sensible, but I see it's not supported yet in all browsers unluckily.