Skip to content

Conversation

@mtsz-pl
Copy link
Contributor

@mtsz-pl mtsz-pl commented Oct 17, 2025

When using "toggle" mode for theme, instead of toggling between "always dark" and "always light" modes, a three-state toggle is employed: "always light", "always dark" and "auto". That way user has total autonomy over how they want the theme to behave.

Because of that, toggle icon needs to display currently selected mode: sun for light, moon for dark, half circle for auto.

Working example: https://mtsz.pl/

Firefox extension to quickly change browser theme with single button: https://addons.mozilla.org/firefox/addon/toggley/

@not-matthias
Copy link
Owner

Thanks for the PR! Is this setting used on any other sites? I haven't really seen it anywhere, which is why I feel like it might be a bit confusing.

@mtsz-pl
Copy link
Contributor Author

mtsz-pl commented Oct 22, 2025

My idea was:

  • when website owner sets "light", "dark", or "auto" modes, they "force" user to use that particular mode
  • so when they set "toggle" mode for the website, it should allow users to pick between all of them, and not only between the "fixed" ones
    For the three-state toggle, I believe it's easy enough for users to discover and understand how it works.
    There are plenty of websites that have this toggle somewhere in interface settings, with popups/menus/radio buttons - I didn't want to introduce any of these; I love the minimal desing language of this theme, that's why I implemented it that way.
    I guess we could add some on-hover hints to make it more clear whats happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants