Closed jmetz closed 12 months ago
For my purposes I created a new version of the themetoggle.js which defaults to the auto value.
themetoggle.js
Basically the same as before except:
var currentTheme = localStorage.getItem("theme-storage"); if(!currentTheme){ if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { currentTheme = "dark"; } else { currentTheme = "light"; } } setTheme(currentTheme);
ie. don't default to light.
light
I'm sure the above is a bit clunky and can be refined, but it gets the job done!
Thanks for reporting!
For my purposes I created a new version of the
themetoggle.js
which defaults to the auto value.Basically the same as before except:
ie. don't default to
light
.I'm sure the above is a bit clunky and can be refined, but it gets the job done!