Re: [csswg-drafts] [css-color-adjust-1] more granular overriding of forced colors mode than per-element (#4178)

**Option 1 addendum**: `color(..., system-color)`
Last but not least, I would like to note that with a tiny update to `color()` behavior, we can make the life of developers super easy! The proposed change here would be that, in forced-colors mode, if the fallback color of the `color()` function is a system color, this system color is always returned irrespective of whether the colors specified on the left would otherwise be recognized as valid.

With this addition, developers don't need to write this:

```css
.disabled-button {
    color: rgb(128 128 128);
}
@media(forced-colors: active) {
    .disabled-button {
        border-color: GrayText;
        forced-color-adjust: out-of-palette-only;
    }
}
```
They could write this instead: (and abstract this in a custom property variable if frequent)
```css
.disabled-button { 
    color: color(rgb 128 128 128, GrayText); 
    forced-color-adjust: out-of-palette-only;
}
```

-- 
GitHub Notification of comment by FremyCompany
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4178#issuecomment-622057498 using your GitHub account

Received on Thursday, 30 April 2020 19:28:17 UTC