4 ms·
Perfect dark mode doesn’t have a toggle; it uses the prefers-color-scheme CSS media query to key off your OS theme preference. At that point, there's no problem
by WiseWeasel 6y ago
Perfect dark mode doesn’t have a toggle; it uses the prefers-color-scheme CSS media query to key off your OS theme preference. At that point, there's no problem with Gatsby or Next.
- elliebike 6y agoIt's definitely simpler to not have a toggle, but I like having the choice. Some websites I frequent often have a dark mode I don't like much, so I switch to light - and vice-versa. Just because a user generally prefers dark mode, doesn't mean they do everywhere!
- noisem4ker 6y agoI think a per-site override switch should also belong to the browser.
- elliebike 6y agoOh I definitely agree there! I don't know if any implement that at the moment though :(
- cercatrova 6y agoYou can use extensions like Dark Reader
- chrismorgan 6y agoOn the contrary, this feature has existed for decades. It’s called user-selectable alternative stylesheets: https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative.... But because no one used it, the feature has not been better positioned in more recent browser UI redesigns, so it’s close to inaccessible in most browsers now. No idea if Chrome and related browsers expose it at all, or even if they’ve ripped the functionality out altogether somewhere along the way.
- saagarjha 6y agoThere’s nothing wrong with having a toggle; it just needs to default to a “system” mode. Unfortunately this site doesn’t seem to implement this correctly, as changing the OS theme doesn’t update the site’s theme.
- sdegutis 6y agoThe best UI for this IMO is a toggle with three choices: light, dark, and same-as-OS.
- barrowclift 6y agoNot necessarily true, I'd argue the "perfect" dark mode uses the system's theme by default like you said, but still allows visitors to manually set light or dark should they wish to view the site a particular way (perhaps they prefer the light mode, etc.)
- asiachick 6y agoAgreed. S.O. recently added dark mode and for some reason my eyes couldn't focus on it. No idea why. I run my editors and my terminal in dark themes. Maybe they didn't have enough contrast. Maybe the fonts are too small or too thin. I have my browser set to "prefer dark mode" but I'm really happy S.O. let me opt out.
- WiseWeasel 6y agoI think the only reason someone who likes dark theme would opt out of your dark mode is because it's not as nice/readable as your light theme, or vice-versa. You should fix that instead. Once your dark mode support is perfect, or at least as good as your light theme, then the toggle serves no purpose.