-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Theme switcher proposal #703
Comments
It will respect the system preference if you select the mode that matches it (i.e. if your system is in dark mode and you're somehow in light mode, switching to dark mode will then mean that if you later switch the system to light mode the site will also switch to light mode). If you set the site mode to something other than the system preference, it will persist across system preference changes. While that's slightly convoluted when you say it out loud, in practice I think it works well. If someone switches their system to a different mode and is annoyed that svelte.dev followed suit, their annoyance will only last as long as it takes them to flip the toggle — thereafter, things will behave as they want. To me that makes more sense than having a more complex UI, where you either need a dropdown (which is annoying from a design perspective — the edge of the current button lines up with everything else using I'm open to being outvoted on this and I'd be curious to see successful prior art, but my gut tells me this isn't worth it. |
It takes 6 clicks to change the settings in GitHub, 3 in YouTube and Stack Overflow (took me a while to even find the settings there) compared to 1 for us. If we were to add high contrast modes etc then maybe the extra complexity would be worth it. Our peer websites (React, Vue, Solid) generally have the same UI we do — a toggle — though React and Solid don't respect system preference, while Vue doesn't respect your site preference if it differs from the system preference as soon as the system preference changes to match the site preference. So I think we're already in a good spot. There are many pressing concerns on the site and I don't think this is one of them to be honest. |
Currently, the theme toggle indicates when light mode or dark mode is active, but not 'system' or 'auto' user preference.
I propose we switch this to a 3-button switcher: light, dark, system (default). I can contribute this change if it's agreeable.
The text was updated successfully, but these errors were encountered: