Re: [csswg-drafts] [css-color-adjust] Should forced-colors support `color-mix()`? (#11097)

> I read that to mean that you can mix colors if you want but the computed value that results will be overridden by a system color.

Thanks, yes, that's a detail that I missed. I just checked, and that is in fact how it works in Blink.

> Those kinds of mixes allow authors to have meaningful hover / active feedback colors even when in forced-colors (without a designated system color for them).

Personally I'd be open to defining new system color keywords to cover these use cases. But I'm also wondering if using some other indicator in forced colors mode instead might (a) more closely follow the user's palette preferences, and (b) steer away from needing to invent even more system color keywords in the future as new use cases come up. Straw example just to illustrate one possibility:
```css
@media {forced-colors: none) {
  select option:enabled:hover {
    background-color: color-mix(in lab, currentColor 20%, transparent);
  }
  select option:enabled:active {
    background-color: color-mix(in lab, currentColor 30%, transparent);
  }
}

@media {forced-colors: active) {
  select option:enabled:hover {
    outline: 1px dotted canvastext;
  }
  select option:enabled:active {
    outline: 1px solid canvastext;
  }
}
```

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 14 November 2024 02:05:09 UTC