[css-color-4] Clarify how `hue` interacts with hue interpolation when both `hue` components are missing
css-color-4
See: https://drafts.csswg.org/css-color-4/#interpolation-missing
> In the course of converting the two colors to the interpolation color space, any missing components would be replaced with the value 0.
> If both colors are missing a given component, the interpolated color will also be missing that component.
So it seems obvious that any interpolation where both input colors have a missing hue will also result in a missing hue in the output.
But implementations don't seem to agree: https://codepen.io/romainmenke/pen/OPWRmdy
This codepen compares three colors:
- explicit `none`: `color-mix(in hsl, color-mix(in hsl longer hue, hsl(none 50% 50%), hsl(none 50% 50%)), hsl(180deg 50% 50%))`
- powerless `hue` by `0` saturation: `color-mix(in hsl, color-mix(in hsl longer hue, hsl(50deg 0% 50%), hsl(50deg 0% 50%)), hsl(180deg 100% 50%))`
- control: `hsl(180deg 50% 50%)`
I am fairly certain that this is a test/implementation issue and not a spec issue.
But wanted to make sure I wasn't overlooking anything.
3 条评论