News for hackers. Stuff that matters.
Re:Dear web developers: set the font color, too by SquareWheel on Friday February 01, 2019 @12:53PM (#19056497)
This comment intrigued me, so I did some digging. Looks like "prefers-color-scheme" is currently being considered by both Chrome[1] and Firefox[2]. A can-I-use page was just created for it[3].

I'm excited by this one! Think I'll add dark mode support to my simple blog right now.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=889087

[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1494034

[3] https://caniuse.com/#feat=prefers-color-scheme

Re:Dear web developers: set the font color, too by chriswarbo on Friday February 01, 2019 @01:18PM (#19056790)
Wow, what an awful thing to standardise! Are there equivalents for high/low-contrast? Red themes, blue themes, multicolour themes, etc.?

Why layer something like this on top of an override system, when devs can choose to just not override those things?

As an example, the only CSS colours I use on chriswarbo.net are either semi-transparent, or mid-grey (which work on light and dark themes, although I might revisit that since it would presumably not work on default-grey systems like AmigaOS).

Re:Dear web developers: set the font color, too by SquareWheel on Friday February 01, 2019 @02:16PM (#19057454)
I would say it's because light mode and dark mode are being inherited from system settings. Windows, Android, and iOS all have a concept of dark mode. The browser can pass these settings along (or allow an override).
Re:Dear web developers: set the font color, too by saagarjha on Friday February 01, 2019 @07:36PM (#19060148)
> Are there equivalents for high/low-contrast? Red themes, blue themes, multicolour themes, etc.?

Not yet, although the API seems open enough to add this.

Re:Dear web developers: set the font color, too by kevin_thibedeau on Friday February 01, 2019 @02:47PM (#19057760)
How else should a site query for the user preference? Everyone is operating in the blind right now.
Re:Dear web developers: set the font color, too by chriswarbo on Friday February 01, 2019 @03:29PM (#19058209)
Sites are already styled according to the user's preference, by default. If you want to respect the user's preference, stop overriding things with CSS.
Re:Dear web developers: set the font color, too by SquareWheel on Friday February 01, 2019 @05:35PM (#19059441)
Sites are styled by default browser stylings. When font changes are inherited from user's settings however, it basically just breaks everything.

For accessibility reasons, using the zoom feature is much more stable than increasing the default font size.

Re:Dear web developers: set the font color, too by chriswarbo on Friday February 01, 2019 @08:21PM (#19060348)
> Sites are styled by default browser stylings

Which users choose according to their preferences (e.g. Firefox offers a preferences dialogue for this, and a bunch of about:config options). Whilst most users leave these as the OS/browser vendor's defaults, (in the words of Rush) "if you choose not to decide, you still have made a choice".

> When font changes are inherited from user's settings however, it basically just breaks everything.

> For accessibility reasons, using the zoom feature is much more stable than increasing the default font size.

So you're agreeing that all these sites are broken?

Re:Dear web developers: set the font color, too by SquareWheel on Friday February 01, 2019 @09:20PM (#19060606)
No, it's just a lost cause. I've had people complain that their website looks crazy on one specific PC, and after tons of debugging found it's because somebody set their default font size to 200px.

Of course, the majority of websites apply their own font styling so this doesn't often come up anymore. But those settings are just death traps at this point. Ineffective in 90% of cases, and hazardous in the 10% where they do work.

Re:Dear web developers: set the font color, too by SquareWheel on Friday February 01, 2019 @05:36PM (#19059449)
Finished now! I ended up switching my SASS variables over to CSS4 variables so I could override them with media queries.

Now to wait for better browser support.