Skip to content

[css-color-adjust-1] more granular overriding of forced colors mode than per-element #4178

Closed
@melanierichards

Description

@melanierichards

Somewhat combinatorial between specs, but css-color-adjust-1, Forced Color Schemes might be the best place to put this.

It would be ideal if an author could override a property value affected by forced colors without requiring the author to set forced-color-adjust to none on the element.

In some cases, authors will want to fully manage how an element is styled in forced color modes, which is an appropriate use of forced-color-adjust. But in other cases, they may just want to change a singular property value without interfering with other UA forced color styles, e.g.:

@media (forced-colors: active) {
  [aria-disabled="true"] {
     color: GrayText;
  }
}

We should perhaps tweak cascade expectation in Forced Color Schemes such that cascaded values outside of the forced-colors media query are unset, but origin override rules apply when additional styles are set within a forced-colors media query block. Essentially want to ensure that point 4 of the Cascade Order in the initial High Contrast explainer is true in standard implementations of forced color modes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions