Closed emilio closed 2 years ago
fantasai: The flag part is an internal impl detail; we just need to spec that these colors, even tho they resolve, need to stay as-is in forced colors mode. chris: suggested wording? fantasai: I can come up with some, yeah
I will wait for the suggested wording from @fantasai before publishing
I sent an update to the relevant WPT here: https://github.com/web-platform-tests/wpt/pull/34170
Closing as WPT now in sync, thanks @emilio
In https://github.com/w3c/csswg-drafts/issues/3847 it was resolved that system colors would compute to themselves. The argument for that seems sensible (which is that color-scheme would be automatically honored for them while inheriting).
However I'm not so sure that's great behavior (plus there are still open issues from that change like https://github.com/w3c/csswg-drafts/issues/5780).
In particular, in order to guarantee contrast, you need to use system color pairs (the foreground and the background), such as:
If color-scheme changes, but the author doesn't specify a background, making system colors compute to themselves at computed-value time breaks contrast (rendered):
The
span
should be dark text over dark background per spec, since it inherits the initial color which iscanvastext
, which is undesirable.That's clearly not how browsers are working today, which confuses me because I thought Chrome implemented this change.
I'd expect this test-case to render per spec the same as the following (rendered):
(which is clearly undesirable, and not what's going on).
Can you explain what's going on here @futhark / @andruud / @kbabbitt / @tabatkins?
cc @smfr