Re: [csswg-drafts] [css-color-5] What should the behavior of the CSS Color 5 color functions be when passed `currentcolor` as <color> (#6168)

@weinig wrote:

> What I am not sure is what the computed value should be. If it should preserve the complete "color-mix(..., currentColor, ...)" that would be fine with me, it just needs to be spec'd.

I just clarified that in the spec, following the suggestions from yourself, @emilio and @tabatkins : 

```html
The computed value is the specified ''color-contrast()'' function
with each <<color>> parameter resolved according to [[css-color-4#resolving-color-values]],
and the keywords ''AA'', ''AA-large'', ''AAA'', ''AAA-large'' replaced with their corresponding numeric value.

If all <<color>> parameters resolve
to the corresponding colors in their respective color spaces,
the used value is the winning color
resolved according to [[css-color-4#resolving-color-values]].
Otherwise (if ''currentColor'' was used in the function),
the used value is the same as the computed value
thus preserving inheritance into child elements.
```

I also changed the example, to now do what the text says.

I also added a new section on resolving `color-mix()`, including what to do with currentColor: 

```html
The computed value is the specified ''color-mix()'' function
with each <<color>> parameter resolved according to [[css-color-4#resolving-color-values]].

If all <<color>> parameters resolve
to the corresponding colors in their respective color spaces,
the used value is the mixed color,
in the specified mixing color space,
resolved according to [[css-color-4#resolving-color-values]].
Otherwise (if ''currentColor'' was used in the function),
the used value is the same as the computed value
thus preserving inheritance into child elements.
```

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


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

Received on Tuesday, 31 May 2022 14:52:23 UTC