[csswg-drafts] [css-color-5] What should happen if the same adjuster is specified more than once in color-mix()? (#6045)

weinig has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-5] What should happen if the same adjuster is specified more than once in color-mix()? ==
In CSS Color 5's color-mix() function, https://drafts.csswg.org/css-color-5/#color-mix, what should happen if an adjuster is specified more than once. For example:

```css
    color-mix(lch, red lightness 60% lightness 40%, blue);
```

In this case, the lightness adjuster is specified twice, which seems ok according to the grammar.

In the investigative implementation in WebKit, I have implemented it as the last one wins, so in the example above, that would be the equivalent of:

```css
    color-mix(lch, red lightness 40%, blue);
```

(also, as with relative color syntax, I wrote a bunch of tests for this feature, https://trac.webkit.org/browser/webkit/trunk/LayoutTests/fast/css/parsing-color-mix.html?rev=273244, but I am not clear if they make sense for WPT at the moment, given the early stage of the spec, please let me know if would be useful to make a PR to add them and I'd be happy to).

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


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

Received on Saturday, 27 February 2021 18:51:01 UTC