Re: [csswg-drafts] [css-color-4] Computed value and serialization of `Infinity` and `NaN` in color functions (#8629)

This comment above says...

  > [...] the "clamp it to your actual allowed range" behavior that V&U specifies for infinite (and other arbitrarily-large finite) values.

... like this [code comment on WPT](https://github.com/web-platform-tests/wpt/blob/abcbb64783af5b776a3c5f4e13cf4d8756217830/css/css-color/parsing/color-computed-rgb.html#L94C8-L94C112):

  > `calc(infinity)` resolves to the upper bound while `calc(-infinity)` and `calc(NaN)` resolves the lower bound.

But this is not what I understand from what [CSS Values and Units](https://drafts.csswg.org/css-values-4/#calc-range):

  > [...] the value resulting from a top-level calculation must be clamped to the range allowed in the target context.

Out of range channel values are *allowed* in all color functions.

Therefore I think it would be great to clarify when and how `calc(infinity)` resolves when serializing (non-mixed) `hsl()` and `hwb()` as components of a declared value, ie. either before or after color space conversion.

-- 
GitHub Notification of comment by cdoublev
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8629#issuecomment-2132625241 using your GitHub account


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

Received on Monday, 27 May 2024 04:34:58 UTC