Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
[flagged] Please, stop forcing a dark theme on a web-site visitors
71 points by Mikho on Aug 23, 2021 | hide | past | favorite | 79 comments
Web services and sites really should stop using dark theme forcefully matching it to a browser or system dark UI theme. Users often use dark theme to distinguish UI from content, not blend content with UI. Properly speaking it's not very user and eye friendly to read for long white text on a dark background. Sites that automatically force a dark theme on visitors remind me of a noob user that learn a new colorful style trick in Word processor who starts applying it in every document.

It's good if a site offers dark theme option via some kind of switch but forcing it on visitors is not the brightest decision. E.g. browser version of Google Books automatically force dark theme while reading a book in case a browser uses one for UI.

More and more I notice that sites do that. And often they even don't offer option to switch the site to a light theme. They just use a browser's UI theme as a guide. It requires to switch a browser to a light one for such sites to use light theme. Thankfully, Google Books offers an option to switch but it's annoying to do it every single time I open it.

Dark UI is to distinguish from, not to blend with content.



Your browser aka user agent is telling the web site that you prefer the dark color scheme (via prefers-color-scheme) so the site _thinks_ it is listening to your preferences. This means that your problem lies with what your browser is communicating. In Chrome Dev Tools, there’s a way to force prefers-color-scheme: light, and I wouldn’t be surprised if there were some Chrome extensions to make managing that even easier. There are probably solutions for other browsers as well.


I know what's happening and why. The thing is the web-site should not suppose anything. It'd better not change defaults at all and deliver conventional colors. If it offers an optional switch to change theme to dark that would be appreciated. But not the fact that it makes and force choice for a user who didn't ask for it. People use dark UI for different reasons and in different context. A web-site just should not try to make a choice in this situation. It could only offer options.


The website does not suppose anything. Your user agent is explicitly asking for a dark UI. That that's not what you want is between you and your browser.


Many comments here say that that's what browser says but there is no way to distinguish UI theme from content theme preferences and it's impossible to have dark UI with light content due to browser limitation. Hence, as they say, it's a problem of a browser, not a web-site.

If it's obvious to everybody that these content preference signals from a browser lack crucial information as to distinguishing between UI and content preferences, maybe it's safer to keep standard default (usually light) and just offer and option to switch to dark theme in case a user wants and remember preferences locally till the next visit.

There is no need to force dark theme in the absence of enough information from a browser as to exact user preferences. Browser doesn't ask for anything. It just says what UI theme a user has. It's a web-site that makes a conclusion based on limited information and then decides to force dark theme on content.

Hence, my post here is to show this situation.


I think you are misunderstanding the feature. Dark mode makes your OS tell all UI to show in a dark color scheme if it has that option. The websites are just doing what you are asking them to do.

What you want is light mode but to use a dark theme on your native UI. You can easy change that in GTK and QT and I remember it was possible to do in older versions of Windows. That will not change the prefers-color-scheme in your browser.


It is likely that your browser either has a setting to disable this, or has an extension that exposes such a setting.

If you want your browser in light mode but the rest of your system in dark mode, that's a niche need, and not a preference you should be trying to force on the rest of the world.


Respectfully, I think you have an opinion and are asking all websites to accommodate your opinion.

> Dark UI is to distinguish from, not to blend with content.

This is how you view Dark UI. That is not how I use it. I like the dark aesthetic and am using a system-level dark mode to universally apply that aesthetic. Native Apps pick it up automatically, and I'm glad websites can as well. Frankly it would be super annoying to have to manually opt-in for a dark mode for all the websites I visit.


Totally agree, I want everything in dark mode, web pages, my text editor, applications, the OS, browser chrome etc. I find bright white screens are not to my taste.


I don't use Dark UI to distinguish from content. I want everything in dark mode ... so I use the Dark Reader extension, but when I notice a site has its own dark mode, I turn off Dark Reader for that site, since they tend to clash.

It should be up to the user: the browser should let the user select which theme preference to pass on to websites. Magic extensions like Dark Reader should turn themselves off when the site is using its own dark mode.

While we're on the topic of browser/site misbehaviour: Sites that presume that my full-screen portrait mode browser is a mobile device need to die in a fire. I do not need big buttons and a hamburger menu on my desktop monitor. WTF don't they have a device-type-query instead of guessing by aspect ratio?


> Sites that presume that my full-screen portrait mode browser is a mobile device need to die in a fire.

As should sites that render font-size such that I get the exact same number of characters per screenful on a phone or tablet. I don’t need giant characters on my iPad, the focal distance is approximately the same, and it’s a waste of screen real estate.


Maybe there should be a UI setting in browsers like "Make everything dark" or "Use dark version by default if a site has it" — to have a clear signal for sites with dark theme option about user's preferred choice.


In fact Chrome has a "Force Dark Mode for Web Contents" experiment under chrome://flags that does the "make everything dark" thing.

Here's an example screenshot I took the other day of the HN frontpage. Chrome with FDM on the left, Firefox on the right: https://imgur.com/a/TiNxsR6


it would be nice if that was a per-site toggle in the UI (that's the approach darkreader uses, and I think it works well).


Looks cool. More browsers should do the same.


Styx browser and Einkbro on fdroid have this. Also, this acts like a switch and can vbe easily changed on a per site basis for Styx Browser. Try it!


You seem to take issue with `prefers-color-scheme`, which is the only signal a website has to know a user's dark/light preferences. I agree websites should allow users to choose (and remember the choice), but I disagree it's wrong if a website honors `prefer-color-scheme` with no option to switch.

Websites that only have a dark mode regardless of user preference I can agree are problematic, but even there I think more context is needed. A personal blog that is only available in dark is probably fine, an email client from a large company would not be.


In theory, the OS should provide the user an option to apply dark mode just to the OS's UI or to content as well. This option would control the value of `prefers-color-scheme` with dark mode enabled.


What? No. If anything, the browser should provide an option to override what's being communicated to websites.


It's OK if a web-site uses the same dark theme as a brand style all the time. But there are some that force it ONLY when browser uses dark UI theme and it requires manipulation with browser theme setting to get the site in light theme.


I think your argument should be rerouted to browser standards and possibly browser vendors, but not websites. prefers-color-scheme is the only signal given to a website. What should a website do if it is set to "dark"? The only reasonable conclusion is to render a dark theme. Also offering a choice on top of that is a nice thing to do, but I can't agree it should be a requirement.

Possibly browsers could offer per site prefers-color-scheme values, and that would probably solve the problem you're having. Even better, it'd solve it with no changes needed for current websites.


[flagged]


There's no need to insult. This is a discussion.

What you want is currently not possible. The web community currently does not see your use case as necessary or in demand. Maybe they are wrong. But again, blaming the websites for this who are just following the standards set for them is misguided.


Many comments here say that that's what browser says but there is no way to distinguish UI theme from content theme preferences and it's impossible to have dark UI with light content due to browser limitation. Hence, as they say, it's a problem of a browser, not a web-site. If it's obvious to everybody that these content preference signals from a browser lack crucial information as to distinguishing between UI and content preferences, maybe it's safer to keep standard default (usually light) and just offer and option to switch to dark theme in case a user wants and remember preferences locally till the next visit.

There is no need to force dark theme in the absence of enough information from a browser as to exact user preferences. Browser doesn't ask for anything. It just says what UI theme a user has. It's a web-site that makes a conclusion based on limited information and then decides to force dark theme on content.

Hence, my post here is to show this situation.


https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pref...

Doesn’t look like a debug only feature to me


Your browser is asking for it. Disable the browser asking for dark ui or use a browser that doesn't by default if you think it's sensible default option.


Having the web site match the site's (dark) theme to the browser's (dark) theme is a feature, not a bug. If you are using a dark theme in your OS or browser, the web site can assume you'd prefer to match that as the default. But providing a way to opt out would be nice too.


Personally, I don't want a web site to know whether I have dark-mode enabled or not; just one more fingerprint. Would they? Or is it just how the browser displays the content?



Thanks.


A side effect of enabling "privacy.resistFingerprinting" in Firefox (enabled by default in Tor Browser). is that it always prefers light mode.


Seems like this is a missing browser feature. Maybe there's some extension for overriding the dark theme setting exposed to websites.



Well, the web-site is wrong if it assumes I'd prefer everything to be dark, not only UI. This is one of the examples of absence of empathy and wrong conclusion about human behaviour by some coder.


> This is one of the examples of absence of empathy

Isn't this an example of an abundance of empathy? If the user has requested dark-mode, websites responding with their best version of a dark-mode experience is an example of user empathy in action.

I operate in dark-mode 24/7 myself, and I've been pleasantly surprised at websites slowly supporting a dark-mode experience and automatically showing that by default.

There should probably be a one-click "override dark/light mode on this site" button somewhere, so that you don't have to dig into your OS to change it back. But the defaults here seem like the most reasonable, most user-respecting thing that could possibly exist.


No. When someone forces on everybody else own understanding of the world regardless of what other people want that's an absence. Not forcing own defaults and giving a choice—that would be more preferrable.


>>When someone forces on everybody else own understanding of the world regardless of what other people want that's an absence.

That is literally what you are proposing though. That website creators should force their creation on everyone else and even though the user has clearly signalled that they want to be in dark mode, they should disregard this preference.

Picking dark mode is a choice, and websites should respect that choice and adapt to it. Not doing so is "forcing on everyone else your understanding of the world".


Standard default usually means light. Changing this to dark means forcing new default. Since there is a browser limitation in telling exactly what a user wants—dark UI and light content or dark UI and dark content—forcing a new default considering that it's exactly what a user wants just based oninformation about UI despite the fact that there are not enough signals is a bit wrong. The safer bet would be to provide a choice but keep defaults to general (light) and not make choice for a user just judging by UI theme.


>>Changing this to dark means forcing new default.

No one is changing the default. Websites are merely respecting YOUR choice.

>>The safer bet would be to provide a choice but keep defaults to general (light)

This is literally how this works already - default is light theme, changing it to dark theme is a choice - I still don't understand what your issue here is.


>>web-site is wrong if it assumes I'd prefer everything to be dark, not only UI

Uhm, no? It's the exact opposite. Nothing worse that opening a website in the middle of the night and it burns your retinas because it has pure white background. I have a dark theme on everything, of course the website should adapt. What's the point of dynamic web otherwise?


Some people use computers in the middle of the day and don't want to stare at dark web-sites though.


Then those people can choose a light theme, it's all about your choice as a user.


> the web-site is wrong

How is the website supposed to know you prefer the content to be light but the UI to be dark?


The web-site should not suppose anything. It'd better not change defaults at all and deliver conventional colors. If it offers an optional switch to change theme to dark that would be appreciated. But not the fact that it makes and force choice for a user who didn't ask for it.


The website isn't supposing anything. The browser is supposing that you want the dark version of the website because you are in the system dark mode.

Why should this be different from say view scale? Should a website override the user's zoom level and render tiny fonts because it wants to? It doesn't, because the browser tells it what scale to use. Same with light/dark modes. Your issue is that your browser doesn't let you configure this one setting, not that every single website on the entire internet doesn't implement what you want.


The website doesn't know what your other UI looks like, it only knows whether you requested dark mode in your browser. Feel free to change your browser settings.


I disagree completely. I want dark mode as the default everywhere. White on black is superlatively legible. Black text on a white background is not. Dark themes reduce eye strain and glare in low-light environments. Dark themes lower screen power consumption. Dark themes are calming. Dark themes invoke a perception of "premium" and "adult," whereas a light theme is often garish, cheap, and juvenile. Dark themes allow me to express the darker aspects of my nature. Dark themes align with my view of the world as a pit of beautiful despair. More dark themes, please!


Those are all your opinions, presented as if they're hard facts. Let me tell you how this plays out for me.

When I visit a dark theme website, all is good for maybe half a minute or so. As you say, less light hitting your eye is somewhat pleasant. But then, somehow, the eye strain starts. My eyes seems to defocus, and it becomes harder to make out letters. I have to squint, and after maybe a minute that no longer helps. If I don't stop reading then, but keep going for a few more minutes it gets progressively harder. Then when I look away, I am blind.

No kidding, can't see a thing, just a grey blur everywhere. Takes several minutes to get back to normal.

I have no idea how common this is. I asked an optometrist about this once, and she looked at me like I was from Mars.

Dark themes are not the solution for everyone, and default dark themes everywhere is my personal nightmare.


> My eyes seems to defocus, and it becomes harder to make out letters.

I don't understand the inner workings, but I get the impression that there is some fuckery going on when keeping the same distance to the screen and heavily diminishing the amount of light reaching the eyes. There may be a threshold (varying among individuals) beyond which the pupils become too open to clearly focus on the text.

I have a slight photosensitivity and most outdoors daylight conditions are too much for my naked eyes, but many dark UIs are too high or too low contrast and feel worse for extensive reading than their light counterparts in a screen matched to a moderately illuminated room (and this also also includes changing screen settings to match environment light conditions when switching between light/dark themes, not just trying with the same settings).

This leads to a life where my screens are stoically dimmed way past their sweet spot most of the time. Colors suck a bit, but at least I can always focus on light UIs without strain and it avoids text persistence (burn-in) in the eye.

Lately I'm trying GitHub Dark (not Dark Default) in VSCode for dim environments at night; it's the lesser offender while retaining some legibility/contrast. Dark Discord seems bearable for a while, too.


The problem is that for a lot of sites white on black is light gray on dark gray.


You should make your browser use `prefers-color-scheme: light`, instead of asking every website in the world to ignore this option and default to your personal preference.


where is the preference in firefox?


It's set by the OS. The browser picks up the OS setting.


I found it. Its in the colors section.


Let's imagine that some people don't use Chrome browser.


Well then communicate your wishes to whoever develops the browser you use. Websites are just complying with what your browser is telling them you prefer. It's your browser that's not giving you the option to change what it tells websites to suit your preference.


So, we still have the same problem. Web-sites think—despite there is being no way to tell that a user doesn't want dark web-site theme, just uses dark UI—that they should definitely unarguably force on a user dark theme. If it's obvious that there is no way to tell exactly what a user wants, but only tell what browser UI a user uses, maybe it'd be more reasonable not to force dark defaults just because the browser has dark UI.


All you have to do is look at all of the replies to your post here on HN to understand that the majority of users who have their OS set to dark mode actually do prefer websites to display in dark mode as well. This is probably why browsers don't (currently) offer an override option.

You are free to have an opinion, but I'm so confused as to why you're not understanding that it's a minority opinion and that the way things work currently actually do make sense.


Those who write angry responses with an opposite opinion are not a majority. That's could be an example of a vocal minority. If some people are loud in their disagreement doesn't mean they are a majority. Those who agree often don't bother to write. That's an understandable mistake that often leads to wrong conclusions. Just judging by comments here is not very useful.


“Doctor doctor, it hurts when I hit myself with a hammer”

“Why don’t you stop hitting yourself with a hammer?”

“Hammers exist to be massage tools. It’s the manufaturer’s fault, they should make them softer. I know lots of people are disagreeing with me, but they’re just a vocal minority, the silent majority want soft hammers!”

o___O


Your opinion on how websites should respond to user preferences is a bit off the wall, to be frank. There aren't many (any?) angry responses here, but there are a lot of responses trying to explain how the current way it works makes sense despite your own opinion to the contrary.

It seems to me like you're just not handling disagreement very well, and that might be something to work on for the future. Especially if you're going to post your opinion publicly.


Even better. If you used an open-source browser like Chromium or Firefox, you could change its behavior yourself.


I disagree completely. I use dark mode on my devices because I don't like glaring bright screens and light-on-dark text is easier for me to read. I'm happy when sites honor this choice without me having to fiddle with a bunch of stuff.


I fundamentally disagree with the substance of your argument; when I have dark mode on it's because I don't want my eyes burned-out in a dimly-lit room. I want everything dark. YMMV obviously, but this is a sensible default.

I do of course agree that choice is good and sites should allow users to switch to a light theme.


I had to disable dark mode on macOS because of how bad dark mode was for so many sites. The common pattern is that they use some sort of framework that ships with dark mode by default, but then the designers override some of the CSS to make the light mode look closer to what they want, but it also affects the dark mode, completely breaking the site.


User preference can also vary strongly with device or display.

Dark mode can be preferable on an emissive display. I don't generally prefer it, though there are some sites using a darker display mode (Mastodon's web client comes to mind) which I prefer to their light modes ...

... unless I happen to be visiting on my e-ink device. That's 1) not emissive (it is visible under reflected light), and 2) display quality is far superior in dark-on-light than light-on-dark mode.

Keep in mind that I might be useing that device on its own (it's effectively an Android tablet) ... or in its mode as an additional display alongside an existing emissive screen. Which means that on the same computer, using the same Web browser, I could have a preference for either a light or a dark mode.

I've been noting several sites which (despite no "prefers-dark" browser setting) default to a dark mode. ArsTechnica and Nitter both come to mind. (Both offer a toggle to a light mode).

Mastodon is configurable when logged in, but when visiting instances unauthenticated, both defaults to and doesn't provide an alternative for dark mode.

Then there are the sites which present various non-black-on-non-white colour schemes, which includes Hacker News. If these are relying on colour to differentiate foreground text from display background, it fails entirely. At best I get a palette of greys. My e-ink device delivers a 16-shade greyscale colour depth, and the result is at best difficult to read, if not entirely unreadable.

Presumptions about colour, colour support, and user preferences are ... risky.

Incidentally: this is one domain in which terminal-based applications shine. I set my terminal to the font face, size, and colour preferences I want ... and all applications follow those. If there's tuning required (the w3m Web browser is a case in point), that application can be set once, and all uses inherit the relevant pallete.

Web design isn't the solution. Web design is the problem.


Your personal preference is not invalid. But think about it this way: making the (very reasonable) assumption that most users who set their system to dark mode want their browser content to match, this default behavior does the most good for the most users, even if it isn't what you personally want.

I don't think anybody would disagree that a manual toggle makes the user experience even better, but since it's not a part of the browser standard, it isn't zero-cost either. It has to be implemented in code (and incorporated into the layout, etc). Does it get associated with the logged-in user's account? If so the full stack has to be roped in; a new database column may be needed. You could just put it in localStorage, but then if the user switches to another device they could be surprised by the fact that this preference doesn't follow them.

It's definitely a nice-to-have, but demanding it as a hard requirement comes across as pretty entitled.

A better framing would have been "Hey web devs, there exist people who specifically want their web content to have a different theme from their system, it would be nice to have a manual toggle even if you already support prefers-color-scheme". It's something that never would have even occurred to me, personally, and so this could have been an illuminating post instead of a rant.


This is a user agent (browser) concern not a web site concern.

The browser is doing what works for similar broad preferences (eg: language). If you think browsers should offer a knob to turn off forwarding you color scheme preference that is reasonable.

What is not reasonable is to encourage sites to ignore content negotiation signals from the browser and rely only on site level controls. The behavior reduces the friction of the web and is a net win for the user.


Many comments here say that that's what browser says but there is no way to distinguish UI theme from content theme and it's impossible to have dark UI with light content due to browser limitation. Hence, as they say, it's a problem of a browser, not a web-site.

If it's obvious for everybody that these content negotiation signals from a browser lack crucial information as to distinguishing between UI and content preferences, maybe it's safer to keep standard default (usually light) and just offer and option to switch to dark in case user wants.

Hence, my post here to show this situation. There is no need to force dark theme in the absence of enough information from a browser as to user preferences.


> Dark UI is to distinguish from, not to blend with content.

This honestly feels like you're using your operating system's dark mode as a way to theme your PC. It's not intended for that purpose, at least to my knowledge. I use it as often as possible because it's easier on the eyes, because I like the aesthetics and because I feel like I can get to sleep quicker after using a dark theme for a while.

You should direct your anger at the lack of theming options in your operating system if choice rather than at applications following the standards that tell them to render things in a dark theme. Skin your operating system in such a way that the UI is dark and distinguished without setting the accompanying "dark" flag and you should be golden.

If your favourite OS vendor doesn't care, direct your anger at the applications lacking the necessary configurability to disable this feature. In Google Books on Android, you can change the reader font and background to either style. In Firefox, you can set ui.systemUsesDarkTheme to 0 in your about:config to make it stop reflecting your dark mode settings.


Eh. Why is it okay for a website to only have a light mode, but not okay for a website to have only a dark mode?


In the past you could set the colors in preferences in Netscape. This was seen as a bad move (we know better) and today you have two choices: some kind of light (gray on white or dark gray on light gray) or some kind of dark ( gray on black or light gray on dark gray).


"Properly speaking it's not very user and eye friendly to read for long white text on a dark background. " I would beg to differ, white text on a dark background is easier to read, easier on the eyes, and less tiring. I'm also not sure what you mean by separating the ui from the context. The whole point of dark mode is to see the content in dark mode, not the ui. As far as following the theme of the browser, that is the whole point. If you don't want sites in dark theme, then don't set your browser to the dark theme. Don't make me have to switch to a dark theme on every site.


> Users often use dark theme to distinguish UI from content, not blend content with UI.

Err, no. I use dark theme because I like dark themes. But I do think the OS should give you more options, like multiple colorblind modes like some modern video games do.


As one of those users who prefers to distinguish UI from content, I support this message.


I use https://github.com/darkreader/darkreader to optionally apply dark themes to websites that don't support themes, or don't provide theme options. It's pretty good, but there are definitely some sites that it doesn't work well enough with. Worth having though, as I do prefer dark themes - I feel my eyestrain has been reduced since using it.

Perhaps this type of functionality (perhaps limited to toggling the prefers-color-scheme setting) is something browsers should consider baking into the default UI/Chrome.


Totally agreed with this. I do turn on dark mode from time to time (when reading longish text or code in a dark env) but I absolutely hate defaulting to dark mode. Worked in a couple of gardens over the last year and on my laptop screen it was horrendous. Had to turn it off one by one.

The aesthetic is fine if you want it, but websites should stop cramming it down everyone’s throat.

While I’m at it, stop it why the freaking wave emoji in your profile.


I guess I'm particularly irritated at the dark mode for Word, which makes it look I have black paper and white text, except the text color is actually black (and paper likely white). When I edit text in Emacs, I don't have any expectation that the dark theme will show up in print output; but Word is a WYSIWYG. Fortunately, its easy enough to disable.


I don't have a problem with honoring the flag. My problem is that it's usually implemented as an afterthought, a checkbox probably using a poorly thought-out style sheet. If you aren't going to elevate your dark design to the same level of care and testing as you do for the default design, then just don't do it.


I feel lots of people here are talking about web applications not websites. Two very different things in my book.

In the case of web apps I think is reasonable, if budget permits, to ship a dark theme to please users. But a website? Total different thing.

web app != web site


Often it's importan also to distinguish UI and content.

UI != content, but for some reason they are often treated as the same thing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: