Want to return to system default? Tough luck! You shouldn’t have clicked it. Delete local storage nerd!
I chuckled out loud. I think it’s funny, I also did the same thing in my blog. There’s a point at which sanity must prevail over completeness. I didn’t explore all the “?”s in Skellige, I’m not going to solve every edge case of theme selection in something I build for fun.
I also have the same issue, I’m using Safari on iOS. On most websites, the theme changes without having to reload the page, thanks to prefers-color-scheme media queries.
I did not use the button, the website is in the default “use device theme” mode. When I switch the theme globally on my device (very easy to do with the control center on iOS/macOS) all the apps and websites of the system are supposed to switch theme immediately. But dbushell.com needs a refresh. Of course, it’s not a big deal, I’m kinda nitpicking, but websites using prefers-color-scheme in a CSS-only fashion don’t have this problem. I suspect yours has a bit of JavaScript that runs when the page loads…
oh yeah that's all true.
my site would auto-switch with prefers-color-scheme if JS was disabled (JS checks local storage for a user preference, but defaults to the system using a media query)
There's probably a better way, but how often are people switching system preferences whilst reading my blog unless encourage to test ;)
The mystery button flips between light and dark. Want to return to system default? Tough luck! You shouldn’t have clicked it.
a pattern I’ve been noticing lately:
this kind of talk has historically been pretty common amongst software engineers, because frankly building good software by hand is very hard! there are more important details to focus on, so if there’s a known deficiency with something small then fuck the user! I don’t have time for that!
but now we have agents. if you don’t want to spend the time on something small like that yourself, ask a robot. if you don’t like what it did undo its changes and tell it to try again, and be more specific. if part of your avoidance comes from not having a good solution in your head, talk to it about ideas. if the thought of that icks you out then go approach it from an angle of curiosity with a human.
whatever your take on agents is (and david, I know you don’t like them) I think this kind of cavalier attitude towards other humans needs to go away. if you want to say you’re anti-ai on the basis on being pro-human, then be pro-human! humans deserve kindness, not tough luck.
I think the logic of it just toggling is pretty solid but then I read the follow up on your linked post too and the argument to not even both with a toggle at all and just follow the system default seems fine too. So when you were "wrong about dark mode" that include changing your mind on the wisdom of the toggle being there at all? Or are you doing it specifically because your readership are mostly devs who are conditioned to expect it but you might not if you had a different audience?
(i kinda think the toggle + a "forget preferences" button might be a good idea but idk, i lean toward saying "meh" to the whole thing.)
One thing i might say tho is if you do have a toggle, it should prolly be visible with a sunlight glare... so making the button always mostly light. I see yours us always white sun even on dark so i think that's a good idea. If the toggle itself goes dark it will be hard to find it when you need it.
tomsmeding | 17 hours ago
Opened the page, got dark mode, looked good, very readable; haven't clicked the button. I trust it works :)
ohrv | 9 hours ago
I chuckled out loud. I think it’s funny, I also did the same thing in my blog. There’s a point at which sanity must prevail over completeness. I didn’t explore all the “?”s in Skellige, I’m not going to solve every edge case of theme selection in something I build for fun.
dbushell | 8 hours ago
there's quite an interesting discussion on the topic (not Skellige, but i did clear every "?" compulsively)
chinmay | 20 hours ago
I have to reload to get it to refresh the mode @dbushell
motet-a | 9 hours ago
I also have the same issue, I’m using Safari on iOS. On most websites, the theme changes without having to reload the page, thanks to
prefers-color-schememedia queries.dbushell | 8 hours ago
hmm i'm not seeing that issue myself, what version of Safari/iOS?
motet-a | 8 hours ago
iOS 27. But I think every browser is affected, I’m also having this little issue with Firefox on macOS.
dbushell | 8 hours ago
thanks! i must be debugging the wrong thing. What's the issue exactly, that the button doesn't work immediately, only after you refresh?
motet-a | 5 hours ago
I did not use the button, the website is in the default “use device theme” mode. When I switch the theme globally on my device (very easy to do with the control center on iOS/macOS) all the apps and websites of the system are supposed to switch theme immediately. But dbushell.com needs a refresh. Of course, it’s not a big deal, I’m kinda nitpicking, but websites using
prefers-color-schemein a CSS-only fashion don’t have this problem. I suspect yours has a bit of JavaScript that runs when the page loads…dbushell | 4 hours ago
oh yeah that's all true. my site would auto-switch with
prefers-color-schemeif JS was disabled (JS checks local storage for a user preference, but defaults to the system using a media query) There's probably a better way, but how often are people switching system preferences whilst reading my blog unless encourage to test ;)lilac | 22 hours ago
a pattern I’ve been noticing lately:
this kind of talk has historically been pretty common amongst software engineers, because frankly building good software by hand is very hard! there are more important details to focus on, so if there’s a known deficiency with something small then fuck the user! I don’t have time for that!
but now we have agents. if you don’t want to spend the time on something small like that yourself, ask a robot. if you don’t like what it did undo its changes and tell it to try again, and be more specific. if part of your avoidance comes from not having a good solution in your head, talk to it about ideas. if the thought of that icks you out then go approach it from an angle of curiosity with a human.
whatever your take on agents is (and david, I know you don’t like them) I think this kind of cavalier attitude towards other humans needs to go away. if you want to say you’re anti-ai on the basis on being pro-human, then be pro-human! humans deserve kindness, not tough luck.
dbushell | 18 hours ago
that’s only a joke, i mention later i don’t like how I’ve done the button and plan to change it
there’s also this post i linked going in depth about whether such functionality is even necessary, it’s been a hot topic in the web world
but sure assume the worst of me!
adam_d_ruppe | 13 hours ago
I think the logic of it just toggling is pretty solid but then I read the follow up on your linked post too and the argument to not even both with a toggle at all and just follow the system default seems fine too. So when you were "wrong about dark mode" that include changing your mind on the wisdom of the toggle being there at all? Or are you doing it specifically because your readership are mostly devs who are conditioned to expect it but you might not if you had a different audience?
(i kinda think the toggle + a "forget preferences" button might be a good idea but idk, i lean toward saying "meh" to the whole thing.)
One thing i might say tho is if you do have a toggle, it should prolly be visible with a sunlight glare... so making the button always mostly light. I see yours us always white sun even on dark so i think that's a good idea. If the toggle itself goes dark it will be hard to find it when you need it.