W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2021

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

From: weinig via GitHub <sysbot+gh@w3.org>
Date: Wed, 31 Mar 2021 17:00:12 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-846969653-1617210009-sysbot+gh@w3.org>
weinig has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-5] What should the behavior of the CSS Color 5 color functions be when passed `currentcolor` as <color>  ==
What should the behavior (both rendered result and computed value) be for the CSS Color 5 color functions (e.g. `color-mix()`, `color-contrast()`, `color-adjust()` and the relative color syntax forms) when one of the passed in <color> values is `currentcolor` (https://drafts.csswg.org/css-color-4/#currentcolor-color)?

For rendering, I assume we just need to delay computation of the color functions until use time when `currentcolor` is used and use the resolved value, but it would be good to clarify that in the spec if it is the case.

For computed value I am not quite sure since none of the color functions currently have anything about their computed value's specified. Should:

```css
background-color: color-mix(in lch, currentcolor 40%, palegoldenrod)
```

have a computed value of `color-mix(in lch, currentcolor 40%, palegoldenrod)`?

In my current implementation, I am eagerly computing the color-mix(), so in all cases that don't involve currentcolor it computes to the resolved color, but this is just an arbitrary choice I made, and I do not think should motivate the direction of the spec.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6168 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 31 March 2021 17:00:13 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:30 UTC