Closed thekid closed 1 year ago
Can we make the initial value depend on the OS user preference?
Can we make the initial value depend on the OS user preference?
In JavaScript, using:
window.matchMedia('(prefers-color-scheme: dark)').matches
However, that would cause the page to flicker.
...and remember decision in cookie. Implements #9
Inspiration taken from https://medium.com/codex/how-to-build-a-dark-mode-toggle-with-css-and-javascript-88a095622aa8