[csswg-drafts] [css-color-adjust-1] background-color in forced color modes needs more than a simple unset (#4175)

melanierichards has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-adjust-1] background-color in forced color modes needs more than a simple unset ==
In [Properties Affected by Forced Colors Mode](https://www.w3.org/TR/css-color-adjust-1/#forced-colors-properties) we define a set of UA stylesheet expectations for various properties, including:

```
background-color: revert !important;
```

In practice, this means most elements are unset to a transparent background color, which is not precisely the best user experience. For example, as the spec is currently written, `.foo` in [this fiddle](https://jsfiddle.net/3s65bgjq/) would have a transparent background and would be awkward to modify via UA stylesheet on top of an unset/revert.

Instead, we probably want to manage the forced `background-color` post computed-value resolution, such that:

* Elements with non-transparent computed background colors are rendered with a solid system background color (e.g. `.foo` in the example renders with a background color of `Canvas`)
* Otherwise, elements' `background-color` can be unset as described. The UA is then free to make further adjustments in their stylesheet, using simple selectors (e.g. selecting for `<button>` elements).

The spec probably needs a language update if allowing this UA logic seems reasonable.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4175 using your GitHub account

Received on Tuesday, 6 August 2019 18:56:07 UTC