2 ms·
> Toggling Themes > There several approaches to go about doing this: > Using a Body Class > Using Separate Stylesheets > Using Custom Properties > Using Se
by account42 2y ago
> Toggling Themes
> There several approaches to go about doing this:
> Using a Body Class
> Using Separate Stylesheets
> Using Custom Properties
> Using Server-Side Scripts
I wish browsers would just expose a more visible prefers-color-scheme toggle. Adding this to every website separately makes no sense. It would also make it more likely that websites respect my configured preference.
Not related to websites, but I would also like to take this upportunity to remind everyone that dark/like toggles might be a win over a single fixed color scheme but are still a massive downgrade over the fully customizable color schmes that desktop operating systems used to support.
- Y-bar 2y agoI think it is a great feature for add-ons and extensions to add additional user features such as this. You can find a lot of extensions such as https://addons.mozilla.org/en-US/firefox/addon/dark-mode-webextension/ https://addons.mozilla.org/en-US/firefox/addon/dark-mode-web...
- phatskat 2y agoExtensions are fine, and also something like this that’s part of the standards used on the web makes a good case for an in-browser toggle that’s on the main UI.