Why is the Dark/Light Mode Toggle not working?

Hello community members, I hope you are well!

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?

Thx in advance!

my community is here: https://hayp.net/

How do your preferences look like?
Did you set a light color scheme for “regular” and a dark one for dark mode?

2 Likes

looks like this:


thank you for your concern…

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?

1 Like

when i select the color scheme as light mode, the toggle works for me.

but not for users who are not logged in. my theme defaults to dark mode.

1 Like

Why don’t you choose a light color scheme for your theme, then?

1 Like

in fact, the fact that the sites have a light theme is tiring for the eyes, especially in the evenings. we all know this argument already (:

but if this is the only solution to make the toggle work, I’m going to have to do it :sweat_smile:

1 Like

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.

4 Likes