This is exactly how I feel when light mode happens at all ever. Please give me the ability to set my account to dark mode across all devices. Please make light/dark a prominent ui switch for all new users. I don’t care if it’s pretty as much as I care that it’s dark. I agree auto is usually not user preference, despite suspecting it’s best for circadian rhythm. But dark is a common strong user preference and I generally quickly leave sites that don’t honor it, and I find it frustrating to have to argue this hard to get you to consider what most software now has as basic functionality (dark mode setting honored by default and synced across devices if changed).
I would implement this and pr it if I understood the codebase well enough, I mean to sit down and get up to speed at some point.
Yeah, agree, but are we not doing this? I think we currently store it per-device, but like, you can just switch to dark mode on all devices?
Or do you mean we should respect an explicitly set browser preference for “dark”? I don’t actually know whether that’s possible while also not following the “auto” setting.
Or do you mean we should respect an explicitly set browser preference for “dark”? I don’t actually know whether that’s possible while also not following the “auto” setting.
Indeed this is not possible, since there is not actually such a thing as an “auto” setting as far as CSS is concerned, but rather simply a system where the prefers-color-scheme media query matches the light value by default, but will instead match the dark value if the browser is commanded to make it so (either manually by the user or automatically by the system). An “auto” setting exists on the system level, and can exist on the website level (as on gwern.net), but not on the “intermediate” level of CSS and browser implementation thereof.
I believe last time I asked about it, which I think was about 6 months ago, you said something that I remembered as approximately that storing it clientside was the only available option for reasons I don’t remember, and that the cost that sometimes the browser forgets clientside settings is just one that dark mode users will have to bear. that takeaway was frustrating and has left me wanting to push about this. it’s entirely possible I misremembered.
The setting is saved by a cookie, which is the same way we store your login token information. I.e. if someone loses their theme cookie, they very likely would also be logged out, so we really can’t do better than that kind of setting (we could make it so that we automatically restore your preference when you log in again, but that seems like it doesn’t really change the basic experience).
I found at least one repro: set dark mode, edit your user settings, tada light mode. I thought I remembered it resetting to light mode without logging me out or a user setting edit, though. I could believe it’s not the storing-it-clientside that’s causing the resets. I haven’t seen as many for a few months, not sure why.
This is exactly how I feel when light mode happens at all ever. Please give me the ability to set my account to dark mode across all devices. Please make light/dark a prominent ui switch for all new users. I don’t care if it’s pretty as much as I care that it’s dark. I agree auto is usually not user preference, despite suspecting it’s best for circadian rhythm. But dark is a common strong user preference and I generally quickly leave sites that don’t honor it, and I find it frustrating to have to argue this hard to get you to consider what most software now has as basic functionality (dark mode setting honored by default and synced across devices if changed).
I would implement this and pr it if I understood the codebase well enough, I mean to sit down and get up to speed at some point.
Yeah, agree, but are we not doing this? I think we currently store it per-device, but like, you can just switch to dark mode on all devices?
Or do you mean we should respect an explicitly set browser preference for “dark”? I don’t actually know whether that’s possible while also not following the “auto” setting.
Indeed this is not possible, since there is not actually such a thing as an “auto” setting as far as CSS is concerned, but rather simply a system where the
prefers-color-scheme
media query matches thelight
value by default, but will instead match thedark
value if the browser is commanded to make it so (either manually by the user or automatically by the system). An “auto” setting exists on the system level, and can exist on the website level (as on gwern.net), but not on the “intermediate” level of CSS and browser implementation thereof.I believe last time I asked about it, which I think was about 6 months ago, you said something that I remembered as approximately that storing it clientside was the only available option for reasons I don’t remember, and that the cost that sometimes the browser forgets clientside settings is just one that dark mode users will have to bear. that takeaway was frustrating and has left me wanting to push about this. it’s entirely possible I misremembered.
The setting is saved by a cookie, which is the same way we store your login token information. I.e. if someone loses their theme cookie, they very likely would also be logged out, so we really can’t do better than that kind of setting (we could make it so that we automatically restore your preference when you log in again, but that seems like it doesn’t really change the basic experience).
I found at least one repro: set dark mode, edit your user settings, tada light mode. I thought I remembered it resetting to light mode without logging me out or a user setting edit, though. I could believe it’s not the storing-it-clientside that’s causing the resets. I haven’t seen as many for a few months, not sure why.
incidentally, you might find https://bottosson.github.io/misc/colorpicker/ to be a useful tool
Ah, that is definitely a bug and we should fix it. I’ll add it to the list.