DEV Community

loading...
Cover image for In 2020, dark or light should be the default theme?

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

pjeziorowski profile image Patryk Jeziorowski Updated on ・1 min read

Just wondering what you guys would prefer as the default setting when you enter a page/blog?

I would appreciate if you would give me your opinions.

Discussion

pic
Editor guide
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
pjeziorowski profile image
Patryk Jeziorowski Author

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.

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
yougotwill profile image
William Grant

Personally do what you like and offer the alternative. I like dark themes my portfolio site and apps are dark themed but I always give a light theme option that is remembered on next visit/use.

I plan on implementing prefers-color-scheme when it becomes more mature.

A lot of it also has to do with having good web accessibility (e.g. Contrast webaim.org/resources/contrastchecker/). Apps like Spotify have no issues with only using a dark theme because they pick their colors intelligently.

Collapse
polyterative profile image
Vlady

I would love for windows to change it basing on the sun position. Websites should follow prefers-color-scheme

Collapse
khalyomede profile image
Khalyomede

Nice idea for following the sun, great!

Collapse
blazephoenix profile image
Collapse
chadalen profile image
Chad Alen

You should use both. Dark is good for dark rooms. Light is good for bright rooms

Collapse
khalyomede profile image
Khalyomede

Why don't you make a poll post? 😉

Collapse
maske_sankett profile image
Sanket Maske

I think both

Collapse
kevboysmith profile image
Collapse
crimsonmed profile image
Médéric Burlet

I think the theme should be based on the brand and what they are trying to represent. Colors help build a brand identity.

Collapse
artistdesignzp1 profile image
Artistdesignzpro

I would prefer dark mode