Dark/Light Mode Toggle

Short answer: yes. The toggle component will enable the dark mode stylesheet, but it does need that stylesheet to be present. If it isn’t present, then it can’t switch to it, currently. In theory, it could switch to it by making a request to the server to load the stylesheet, but that would make the component a bit more complicated.

This is a recent change, because now the dark/light mode toggler respects the OS dark mode setting. If a user toggles their OS appearance, this component’s setting is reset. (For example, if user’s OS is in light mode, they switch to dark mode using the component and then switch the OS to dark mode, the override will be reset. There will be no changes on the site’s color scheme, but if the user then switches the OS back to light mode, the site will follow, it will auto-switch to light mode.)

@jordan.vidrine the “Enable automatic dark mode color scheme” checkbox is shown if a) no dark color schemes are marked as “user-selectable” and b) the " default dark mode color scheme" setting is set to something other than “None”.

2 Likes