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.
It'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!
On 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.... 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.
Not 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.)
Agreed. 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.
I 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.
There’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.