Re: [csswg-drafts] [css-color] It should be possible to specify the contrast algorithm for color-contrast() (#7356)

> Question is also what to do if the specified algorithm (or maybe even the contrast ratio) are not supported by the UA. Should it be invalid at computed value time or should the UA fall back to its default algorithm or something else?

No reason to be invalid at computed value time, it should be invalid at parse time so it can be detected by `@supports`

> i'm only a tiny bit curious why it's a function

Because levels don't mean anything outside their algorithm, so they need to be associated with that. If levels were just keywords we could hyphenate (e.g. `wcag-aa`), but since they can also be `<number>`, a function is the only way to go.

-- 
GitHub Notification of comment by LeaVerou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7356#issuecomment-1157415394 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 09:03:19 UTC