Re: [csswg-drafts] [css-color-4] Converting out of gamut colors to `hsl` can result in negative saturation with the sample code (#9222)

> It looks like, in modern syntax, Firefox clamps negative saturation while Chrome does not ([test](https://codepen.io/svgeesus/pen/gOEvGWw)). Both clamp, per CSS Color 3, in legacy syntax.

So, what do we want the spec to say? I lean slightly towards not clamping in modern syntax, which has no back-compat worries, and we can't change the clamp in legacy stntax. 

Also, this is only at parse time; intermediate results from color conversion will not be clamped.

@emilio @dbaron @weinig 

Once we resolve, I can either continue the [WPT PR that requires clamping in modern syntax](https://github.com/web-platform-tests/wpt/pull/44269) or close it, as appropriate

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


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

Received on Monday, 5 February 2024 20:19:01 UTC