We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a5fb09 commit b4d2c11Copy full SHA for b4d2c11
src/components/containers/core/Root/Root.jsx
@@ -80,8 +80,12 @@ export default class Root extends Component {
80
}
81
82
state = {
83
- themeMode: readSessionCache(SESSIONSTORAGE_KEY_THEME_MODE) || MODE_BRIGHT_SNOW_FLURRY
84
- };
+ themeMode:
+ readSessionCache(SESSIONSTORAGE_KEY_THEME_MODE) ||
85
+ (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches
86
+ ? MODE_DARK_NIGHT_FROST
87
+ : MODE_BRIGHT_SNOW_FLURRY),
88
+ };
89
90
/**
91
* Toggles the global theme mode and persists it in the browser's session storage.
0 commit comments