Describe the bug
If the light or dark theme has not been manually selected by the user, than it should automatically be chosen based on the prefers-color-scheme property. If this property is not available, we should be using the dark theme as the default.
Steps to reproduce
Steps to reproduce the behavior:
Enable dark mode in your OS
Reload the site in an incognito window so that local storage is not preserved
Notice the light theme is loaded and the setting is automatically stored in local storage
Expected behavior
Theme selection should use the following rules:
We should be picking the theme based on the prefers-color-scheme property if it exists
We should not be saving any particular theme to local storage unless the user specifically picks that theme
If the prefers-color-scheme property is not available and the user has not picked a theme, we should select the dark theme by default as this is the best looking one
Helpful info
Describe the bug If the light or dark theme has not been manually selected by the user, than it should automatically be chosen based on the
prefers-color-scheme
property. If this property is not available, we should be using the dark theme as the default.Steps to reproduce Steps to reproduce the behavior:
Expected behavior Theme selection should use the following rules:
prefers-color-scheme
property if it existsprefers-color-scheme
property is not available and the user has not picked a theme, we should select the dark theme by default as this is the best looking one