Closed
Description
In Properties Affected by Forced Colors Mode 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 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 ofCanvas
) - 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.