Re: [csswg-drafts] [css-color] color-contrast() should allow specifying multiple contrast algorithms that need to be satisfied (#7357)

`color-contrast(white vs yellow, blue to wcag3(AA) hct(40) wcag2(AA))` is starting to be a mouthful, but could be mitigated with custom properties and supports queries. 

```css
@supports (color: color-contrast(#F00 vs #00F, #0F0 to wcag3(AA))) {
  :root {
    --target-ratio: wcag3(AA);
  }
}

.custom-label {
  background: var(--some-bg);
  color: color-contrast(var(--some-bg) vs #111, #eee to var(--target-ratio, wcag2(AA)));
}
```

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


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

Received on Thursday, 16 June 2022 03:42:17 UTC