Add dark mode toggle to Discourse

Logging out and logging back in seems to fix it.

2 Likes

Yes, I did the same.

1 Like

Phew. That’s better.

:white_check_mark: Solution :wink:

1 Like

Are these the correct settings? Does the box in the ‘Dark Mode’ section need to be checked? (mine wasn’t initially)

image

1 Like

It is correct, and the checkbox is not required for the toggle.

What is the purpose of the checkbox in that case?

1 Like

When manually toggling the theme in the web browser’s settings, a Discourse instance can be configured to automatically switch colour schemes. Unchecking the box means the Discourse instance only follows the theme configured by the user account instead. However, that requires saving the changes in the Interface tab for it to take full effect, so if you manually toggle light/dark theme using the top button, that takes precedence instead, regardless of the other two settings.

This gives you flexibility for web browser fingerprinting purposes. You could have your web browser configured to have its theme set to Auto, the Discourse theme in the Interface tab set to Light, and only use the top button to toggle themes, assuming JavaScript is enabled.

1 Like