4 ms·
Dark Mode Toggles Should Be a Browser Feature
- secretsatan 4y agoI was going to say it should respect the system setting. Apparently that’s a problem. But personally, i find it irritating if something can, but doesn’t respect my system setting, and i personally fought to not include such a toggle on an iOS app. At least on iOS, if you set things up correctly, it’s easy to support the system setting, and implementing a toggle makes things harder but i am not a web developer, so won’t comment on the problems there. I’ll add that on iOS, you can add the light/dark toggle to that drop down from the top right drag down menu. In most cases, i use dark mode anyway, i find the need to change the mode because something looks terrible in one mode or the other to be few and far between, but sometimes, i like to work outside, and just switch to light mode. And if i have to find another toggle because something didn’t respect that, it is irritating
- atoav 4y agoTo be honest, I like the ability to override the darkmode setting of an app. I want certain apps to be bright sometimes, without having to switch the whole system.
- CamelRocketFish 4y agoI agree. In all my apps, I provide 3 settings; system, dark and light with the default option being system.
- winrid 4y agoWe'll probably get a "dark mode" DOM event at some point, if there isn't already.
- mgrandl 4y agoThere is. You can listen to media query changes. So listening to prefers-color-scheme already works quite nicely and I use it in my current project.
- winrid 4y agooh neat. I'll have to see if it propagates to iframes, if so I can update FastComments since it supports dark mode.
- atom_arranger 4y agoBrowsers should implement setting the preferred scheme per site at some point. It would also be interesting if they could support more than just light and dark.
- mgrandl 4y agoBoy I really hope so. As it stands a lot of people implement their own toggles and only use „prefers-color-scheme“ for the initial setting of the theme. Using the plain media query everywhere would be much preferable and actually reduce the amount of CSS needed by a fair amount.
- Cloudef 4y agoBut fingerprinting
- lawgimenez 4y agoFirefox for iOS has this feature and it was my favorite. I can toggle HN to dark mode too.