[csswg-drafts] [css-color-5] For color-mix(), what should happen if you provide an adjuster without a paired percent? (#6046)

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

== [css-color-5] For color-mix(), what should happen if you provide an adjuster without a paired percent? ==
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 without a percentage. For example:

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

The grammar for color-adjuster allows this:

```
<color-adjuster> = [ [
      <srgb-adjuster> | <hsl-adjuster> | <hwb-adjuster>
    | <xyz-adjuster> | <lab-adjuster> | <lch-adjuster>
  ] | alpha ] <percentage>?
```

due to the "?" after <percentage>, but I am unclear what the semantics are of that.

In my investigative implementation, I treat an adjuster without a percentage as equivalent to specifying 0% for that adjuster, so for the example above, it would be equivalent to:

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

but I am not convinced this is the intention of the spec authors.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6046 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:57:49 UTC