Re: supporting operating system dark-mode preference while still allowing the user to choose: you may want to take a look at how dark mode is implemented on gwern.net.
We actually have a prototype that enables dark mode conditional on system preference using media queries, and this works for almost everything, but unfortunately there’s one library we’re using (material UI) that this doesn’t work with because it generates its styles dynamically in an SSR context. So most of the remaining work for this is prying apart that particular library to get finer grained control of its stylesheet-generating internals.
Re: supporting operating system dark-mode preference while still allowing the user to choose: you may want to take a look at how dark mode is implemented on gwern.net.
We actually have a prototype that enables dark mode conditional on system preference using media queries, and this works for almost everything, but unfortunately there’s one library we’re using (material UI) that this doesn’t work with because it generates its styles dynamically in an SSR context. So most of the remaining work for this is prying apart that particular library to get finer grained control of its stylesheet-generating internals.