top | item 39186884

(no title)

whatyesaid | 2 years ago

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.

discuss

order

Tomte|2 years ago

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)

RealCodingOtaku|2 years ago

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...