- From: Sam Weinig via GitHub <sysbot+gh@w3.org>
- Date: Fri, 26 Apr 2024 15:48:28 +0000
- To: public-css-archive@w3.org
weinig has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-color] Clarification needed on how missing alpha components flow through relative color syntax for hsl/hwb ==
In the WPT test, `css/css-color/parsing/color-computed-relative-color.html`, there are a few examples I don't quite understand and can't figure out which language in the spec dictate them.
One is:
```
fuzzy_test_computed_color(`hsl(from rebeccapurple none none none / none)`, `color(srgb 0 0 0 / none)`)
```
What allows the alpha value to be passed through as `none`?
My understand here of the operations performed is:
1. `rebeccapurple` converted to hsl() [`hsl(270 50% 40%)`]
2. Relative color is resolved via channel arguments to `hsl(none none none / none)`
3. `hsl(none none none / none)` is converted to `color(srgb)` for serialization, resolving all missing components to 0 [`color(srgb 0 0 0 / 0)`] (https://drafts.csswg.org/css-color-5/#serial-relative-color)
Is the intention for that last conversion (from `hsl()` to `color(srgb)`) to carry forward analogous component missing values?
Somewhat perplexingly (and perhaps just an error in the test), the corresponding test "css/css-color/parsing/color-valid-relative-color" has a similar example.
```
fuzzy_test_valid_color(`${hslFunction}(from rebeccapurple none none none / none)`, `color(srgb 0 0 0 / 0)`);
```
My expectation is that they should at least expect the same result.
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10254 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 15:48:30 UTC