- From: Romain Menke via GitHub <sysbot+gh@w3.org>
- Date: Fri, 26 Apr 2024 21:50:17 +0000
- To: public-css-archive@w3.org
> But this makes me wonder if the spec is even clear that none should be preserved during serialization!
It is :)
https://drafts.csswg.org/css-color-4/#serializing-color-values
> For syntactic forms which support [missing color components](https://drafts.csswg.org/css-color-4/#missing-color-component), the value [none](https://drafts.csswg.org/css-color-4/#valdef-color-none) (equivalently NONE, nOnE, etc), shall be serialized in all-lowercase as the string "none".
But if colors go through color space conversion `none` is lost even before that.
----
That demo is showing how these work as expected :
```css
color-mix(
    in hsl,
    hsl(none 70% 70%),
    hsl(50deg 50% 50%)
)
color-mix(
    in lch,
    lch(70% 20% none),
    lch(50% 20% 50deg)
)
```
`none` works and you get `50deg` in both cases, not `25deg`.
But with relative color syntax they start to differ.
This, conceptually should match the first example with `hsl`.
It has the same channel values, and yet it has a hue of `25deg` in Chrome.
```css
color-mix(
    in hsl,
    hsl(from red none 70% 70%),
    hsl(50deg 50% 50%)
)
```
`lch()` is not affected by this
-- 
GitHub Notification of comment by romainmenke
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10211#issuecomment-2080163458 using your GitHub account
-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 26 April 2024 21:50:18 UTC