Dark/Light Mode Toggle

Hmm, I cant seem to get this to happen. :cry: Sorry about that

2 Likes

Hello, can you merge translations Add Arabic translation by jermanuts ¡ Pull Request #37 ¡ discourse/discourse-color-scheme-toggle ¡ GitHub

Thanks for making it :heart:

3 Likes

Hi. Is there a reason that the dark mode doesn’t stick when I refresh the page in my Chromium-based browser (not using Google Chrome) on my PC and a lot of times just does nothing when I click on it?
It’s all setup correctly, but no idea why it won’t stick or toggle at all a lot of the times.

1 Like

For some reason on my instance the button is not showing in the most left bottom corner:

image

vs Meta:
image

I have been trying this on a default theme with only this compoonent enabled, and no other custom CSS, am I missing something here?

Even in safe mode, with all plugins disabled and just the default theme + this component, the toggle button is not in the same place.

1 Like

On another note, I see this issue happening on Meta, noticed this on my instance for a while now but figured it was just me)

This happens when the scheme is changed manually, and does not match the system scheme (as far as I can tell) - a refresh fixes it, but randomly the logo will revert to the “system” color ignoring the manually changed mode through the button.

2 Likes

seems a bug when chrome in dark mode ?
(saw discussed above)

how to reproduce:

  • discourse 3.2.1
    personal preference > color scheme: regular is a light theme, dark mode: same as regular

  • chrome uses system theme (system auto switch to dark in the evening)
    in the evening, when system switches to dark mode, chrome in dark mode too,

the switcher button does not work in the evening for the case above.
while, it works well in day time,
saw the discussion above, saying due to the preference sets dark mode to “same as regular”,
but why it could switch to dark mode in the day time ?

1 Like

When entering another board after a toggle, the site logo temporarily doesn’t change to match the toggled mode

1 Like

Hi @eveyone can someone help me in how to add the toggle
i’m using this guide i’m not able to see the togle i already installed on my Theme so but that toggle is not showing anywhere no in header or footer?

1 Like

Did you follow the instructions in the first post? Do you have 2 color schemes that can be choosen by users and did you configure a default dark color scheme?

3 Likes

I finally managed to fix this issue after hours of debugging. Deleting and installing Sidebar Theme Toggle solved it!

2 Likes

Might be helping someone out there, to avoid all your users to have to meddle with Interface settings I find that having the light mode default actually solve the toggle doing nothing (as well as for non logged in users).

image