[csswg-drafts] Two "variants" of `color-mix()` ?? (#10573)

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

== Two "variants" of `color-mix()` ?? ==
In CSS Values 5 I was [astonished to read](5.3. Interpolated Color Values: the [color-mix()](https://drafts.csswg.org/css-color-5/#funcdef-color-mix) notation)

> This specification extends the [color-mix()](https://drafts.csswg.org/css-color-5/#funcdef-color-mix) [functional notation](https://drafts.csswg.org/css-values-4/#functional-notation) as a [mix notation](https://drafts.csswg.org/css-values-5/#mix-notations) accepting the following syntaxes:

> [<color-mix()>](https://drafts.csswg.org/css-color-5/#funcdef-color-mix) =
  color-mix( [<progress>](https://drafts.csswg.org/css-values-5/#typedef-progress) [&&](https://drafts.csswg.org/css-values-4/#comb-all) [<color-interpolation-method>](https://drafts.csswg.org/css-color-5/#color-interpolation-method)[?](https://drafts.csswg.org/css-values-4/#mult-opt)[,](https://drafts.csswg.org/css-values-4/#comb-comma) [<color>](https://drafts.csswg.org/css-color-5/#typedef-color)[,](https://drafts.csswg.org/css-values-4/#comb-comma) [<color>](https://drafts.csswg.org/css-color-5/#typedef-color) ) [|](https://drafts.csswg.org/css-values-4/#comb-one)
  color-mix( [<color-interpolation-method>](https://drafts.csswg.org/css-color-5/#color-interpolation-method)[,](https://drafts.csswg.org/css-values-4/#comb-comma) [[<color>](https://drafts.csswg.org/css-color-5/#typedef-color) [&&](https://drafts.csswg.org/css-values-4/#comb-all) [<percentage [0,100]>](https://drafts.csswg.org/css-values-4/#percentage-value)[?](https://drafts.csswg.org/css-values-4/#mult-opt)][#{2}](https://drafts.csswg.org/css-values-4/#mult-comma) )

> The used value of the first [mix notation](https://drafts.csswg.org/css-values-5/#mix-notations) variant is equivalent to assigning the [<progress>](https://drafts.csswg.org/css-values-5/#typedef-progress) value, as a [<percentage>](https://drafts.csswg.org/css-values-4/#percentage-value), to the <percentage> of the second [<color>](https://drafts.csswg.org/css-color-5/#typedef-color) argument in the second variant. That is, color-mix(progress, color1, color2) is equivalent to color-mix(color1, color2 progress). See [CSS Color 5 ยง 3 Mixing Colors: the color-mix() Function](https://drafts.csswg.org/css-color-5/#color-mix) for the normative definition of the second variant.

Why is there a second "variant" of `color-mix()` defined, with **zero discussion** that I can recall, which is merely a permutation of the parameter order, and  has **zero** tests in WPT, unlike the other "variant" which is **widely** implemented, with [1510 tests in WPT](https://wpt.fyi/results/css/css-color?label=master&label=experimental&aligned&q=color-mix) and part of Interop 2023?

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


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

Received on Saturday, 13 July 2024 23:16:11 UTC