Live data from Hacker News

Dear web developers: set the font color, too

luu.io

11–20 of 151 posts

Re: Dear web developers: set the font color, too

#11
post #4

Sure it's not an issue with whatever is doing that (hacky) dark mode CSS? Looking at the google example, they are setting the font color. It just doesn't look good when dark-mode CSS doesn't take the existing colors into account.

> Looking at the google example, they are setting the font color

In most examples, they're setting the background colour without corresponding font colour. In the Google example, they're making the opposite mistake.

One should set both or none.

Re: Dear web developers: set the font color, too

#12
post #3

Definitely agree accessibility is important going into 2019. Different users are going to be viewing a site with more screen readers, dark theme, and other alternative viewing options, very much like we saw with mobilegeddon and the advent of responsive design. I've seen the argument that this hurts the "intended web experience", but this can be solved by keeping up with modern CSS practices and crafting the experien…

How does HN stack up in terms of accessibility? Anyone using a screen reader with HN? What do you wish was different?

Re: Dear web developers: set the font color, too

#13

What has happened to the concept of "User Defined CSS"? Is it totally gone? Did Chrome kill it? Browsers should be making this a prominent and first-class feature. Users should be able to quickly and easily set their default styles for various elements and choose at what precedence level they apply.

[deleted]

Re: Dear web developers: set the font color, too

#14
post #6

Never though about this before, but, dark themes have only recently become widespread, so I'm not necessarily faulting web devs on this.

Dark themes are just exposing these bugs in sites. They're still bugs, dark theme or not—this only occurs when a developer explicitly sets the BG/FG colour without setting a corresponding FG/BG colour—which would always be an oversight/accident. This doesn't occur if a developer does nothing.

Re: Dear web developers: set the font color, too

#17
post #5
post #4

Sure it's not an issue with whatever is doing that (hacky) dark mode CSS? Looking at the google example, they are setting the font color. It just doesn't look good when dark-mode CSS doesn't take the existing colors into account.

The dark mode is actually coming from the GNOME system colors, not browser plugin. From inspecting the CSS in the developer console, the cases in the screenshot either set the background color without setting the text color, or vice versa.

I have a dark theme enabled on xfce, and this is not a problem for me in chromium. The inputs in native apps are dark, but they are the default light color in web pages on chromium.

Re: Dear web developers: set the font color, too

#19

What has happened to the concept of "User Defined CSS"? Is it totally gone? Did Chrome kill it? Browsers should be making this a prominent and first-class feature. Users should be able to quickly and easily set their default styles for various elements and choose at what precedence level they apply.

Browsers have supported user defined CSS defaults since forever, and plugins like Stylish have been around for a while.

The practice of users customizing their CSS isn't prevalent because modern sites are incredibly complex and the average user doesn't want (or know how) to spend the time necessary to reverse engineer a site's layout and rewrite its CSS - there is no "quick and easy" way to do that for any but the simplest sites. Just consider how often professional developers complain about CSS, and they get paid to put up with it.

Re: Dear web developers: set the font color, too

#20
I hit this same same issue too. I tried to eliminate white backgrounds, because I find it tiring on my eyes and a bit painful. These sites made it too annoying to change the defaults, so I ended up giving up (and just always having my screen brightness near minimum).

But before I gave up I started collecting sites that either set background-color and not font color, or set color but not background-color: https://gist.github.com/mrspeaker/1846b6b0e12c76f7eeb2. There's a useless list for you!

Post reply on HN