Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have set my OS to dark mode on windows and android.

It doesn't work without extensions like DarkReader etc if you don't provide the theme/CSS as the website. I uninstalled DarkReader because it just guesses how to map things over and some websites became unreadable or in subtle ways things don't display properly.

Maybe I will use whatever is suggested here but you really shouldn't have to for a site as big as HN.



No site should have to cater to dark users, is my point. That doesn‘t help you today, but complaints should be directed at browsers and OSes, not web site owners.

(I realize that HN does have color CSS rules, but this complaint comes up all the time even with web sites that don‘t specify colors)


As a developer, OS or Browser deciding the colors of my website would be a nightmare. The web is diverse, everyone doing their own weird colours in whatever weird way they can think of.

But we do get the "prefers-color-scheme"[0] and "color-scheme"[1] CSS media features, they make it easy for everyone, the visitor can just change the OS/Browser theme and the browser tells the website about what color the visitor prefers. It's up to the developer to ignore/accept their preference.

This is an accessibility thing, many hates dark theme, and some cannot look at a bright screen for long, all sites should provide either a way to change the theme or use these CSS features.

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

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/color-schem...


> and the browser tells the website about what color the visitor prefers

1. dumping work on the web author.

2. no, it doesn‘t tell what color. It simply says dark or light. Who knows which color fits into the rest of the system? The web author certainly cannot know that.


For 1 - Yes, it is dumping the work on the web author -- And the web author must be the person who decides the styles. It is impossible for the browser to do it because of the diverse styling on the internet, even the existing extensions that try to apply colorschemes break for me all the time.

This situation is created by the web developers, doing whatever they can and however they can because even the existing standards are not really enforced, they don't even care about schematics and just use a framework that generates nested `<div>`. The texts are not readable due to the contrast difference, random styles being injected dynamically via JavaScript, etc.

For 2 - I would say that something is better than nothing. Why not provide a slightly better experience for the minority than providing nothing at all? I don't see the argument here, internet stranger.

If the theme preference needs to align with the entire system theme, feel free to make a proposal in W3C, with enough traction we can make it happen.


For my web sites I don‘t decide on color styles. It‘s all system style. If your system doesn‘t handle that to your liking, talk to your system implementer, not me. I won‘t do anything for you.

> feel free to make a proposal in W3C

Why would I? I have no need for ugly dark themes.


> For my web sites I don‘t decide on color styles. It‘s all system style.

This is false, I had a look, if you are talking about the sites you linked in your Keybase profile, I found that you are using prefers-color-scheme to decide what colors the visitor should see if they have dark mode. This is exactly I'm asking others to implement.

    @media(prefers-color-scheme:dark) {
      body {
        color:#fff;
        background:#000
      }
      a:link {
        color:#cdf
      }
      a:hover,
      a:visited:hover {
        color:#def
      }
      a:visited {
        color:#dcf
      }
    }
If you didn't know that you had this, then you might be using a CSS framework without actually understanding what it does.

No further comments by me will be added here.




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

Search: