If I enable Dark Mode, I want it to stay this way until it is disabled rather than reset on page load.
Downstream report: https://phabricator.miraheze.org/T5065
Fixing this requires two steps:
- Applying the client-dark-mode class on page load, rather than using JS. This means we need a way to manipulate the <html> element server-side before rendering (done with https://gerrit.wikimedia.org/r/c/mediawiki/core/+/592766)
- Persist the option to use dark mode across requests. Full-document caching systems such as Varnish may make this difficult for logged out users and/or some read-only wikis. How to solve this is still up for debate (see comments)