The user MCATAKCIN reports that the dark/light mode toggle isn’t working on their site, despite proper setup. Moin explains that the toggle requires a distinct light and dark color scheme in the theme settings. MCATAKCIN confirms they had a dark scheme set as ‘light’, causing the toggle to fail. After switching to a proper light scheme, the toggle works for logged-in users but not for guests, as the theme defaults to dark mode. Moin suggests setting a light theme as default, but MCATAKCIN notes the discomfort of a light theme in the evening. Jagster clarifies that the toggle relies on having both light and dark schemes configured correctly, and that the system uses device settings when both are set properly.
I installed this component on my site and made the settings, but it doesn’t work when I press the button. I can’t find a console error in dev tools, why isn’t it working?
So you chose a dark color scheme as your “light” color scheme. Then the toggle toggles between dark and dark. Have you tried to choose a light color scheme in the dropdown?
It doesn’t work that way. You forgot that setting of forum admin side has default for dark mode too. When themes default is light, and when an user has dark as a dark option in settings, the toggle has something to toggle. Otherwise it tries change from dark (if that is telled as light) to dark.
And when you have light and dark right then automatic knows how to follow settings of a device.