diff --git a/src/components/containers/core/Root/Root.jsx b/src/components/containers/core/Root/Root.jsx index 91b3b6a9..9f51bf9a 100644 --- a/src/components/containers/core/Root/Root.jsx +++ b/src/components/containers/core/Root/Root.jsx @@ -80,8 +80,12 @@ export default class Root extends Component { } state = { - themeMode: readSessionCache(SESSIONSTORAGE_KEY_THEME_MODE) || MODE_BRIGHT_SNOW_FLURRY - }; + themeMode: + readSessionCache(SESSIONSTORAGE_KEY_THEME_MODE) || + (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches + ? MODE_DARK_NIGHT_FROST + : MODE_BRIGHT_SNOW_FLURRY), + }; /** * Toggles the global theme mode and persists it in the browser's session storage.