- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 14 Feb 2024 19:01:04 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-color-4] Parse-time clip of HSL negative saturation for modern syntax?`, and agreed to the following: * `RESOLVED: All hsl() clip to non-negative numbers for saturation` <details><summary>The full IRC log of that discussion</summary> <fantasai> chris: Long thread because originally about something else, but discovered a problem so about that<br> <fantasai> chris: CSS Color L3 required that negative saturation be clipped<br> <fantasai> chris: all implementations do that, tested in css-color-3 tests<br> <fantasai> chris: We have since decided that we want to round-trip through HSL<br> <fantasai> chris: which requires representing out-of-gamut colors<br> <fantasai> chris: and HSL bakes sRGB<br> <fantasai> chris: Because color-4 said don't clip, and color-3 said clip<br> <fantasai> chris: UAs interpreted, clip for old syntaxes and don't clip for new syntaxes<br> <fantasai> chris: There are pros and cons to various approaches<br> <fantasai> chris: My preference is it's better to not clip in modern syntax, but we need to agree on that<br> <fantasai> chris: also this is a parse-time clip, values from the stylesheet. If you happen to wander into HSL because of color conversion, then we don't clip<br> <emilio> q+<br> <emilio> fantasai: is there a web compat constraint for not clipping in the old syntax?<br> <emilio> ... could we not clip always?<br> <fantasai> chris: It's been baked in for so long, it might break some sites ... I haven't checked, but it would be a change<br> <emilio> chris: it's been there for a while and interoperable<br> <emilio> fantasai: it's fairly rare to type negative values<br> <emilio> ... it seems it might be possible to just not clip<br> <emilio> ... maybe we should try to pursue<br> <astearns> ack fantasai<br> <emilio> chris: it's not non-sensical, it just means that you've gone past the axis<br> <fantasai> astearns: We could resolve on modern syntax, and then check if old syntax could be changed<br> <astearns> ack emilio<br> <fantasai> emilio: Can you remind me, what status is on colors serializing to rgb?<br> <fantasai> emilio: IIRC at least some of the HSL syntax serializes to rgb()<br> <fantasai> emilio: if it serializes to rgb() then it should be consistent and clip<br> <fantasai> chris: Correct, and that's why for color-mix() when you go through HSL you come out in color() rather than hsl()<br> <fantasai> emilio: I suggest either do Firefox behavior (always clip) or make modern HSL syntax not serialize to rgb()<br> <fantasai> emilio: but that does seem more risky<br> <chris> s/rather than hsl()/rather than rgb()<br> <fantasai> emilio: because otherwise the color can't round-tirp<br> <fantasai> s/tirp/trip<br> <fantasai> chris: Worried about Web-compat for not serializing to rgb()<br> <fantasai> emilio: I think ideally the color should round-trip.<br> <fantasai> emilio: div.style.color = div.style.color shouldn't change the color<br> <fantasai> chris: Would Chrome change to always clip?<br> <fantasai> [none of the Chrome engineers step up to answer]<br> <fantasai> chris: Based on legacy syntax tests, we have interop on it<br> <fantasai> chris: Was going to commit tests for new syntax, and dbaron was unsure when reviewing so we have this issue<br> <fantasai> matthieud: for color-mix() we still [missed] so we clip<br> <matthieud> for color-mix, we still output rgb syntax and not color(in srgb...)<br> <fantasai> emilio: since legacy syntax (and modern) syntax convert to rgb(), more consistent to clip always<br> <fantasai> chris: I would be OK with that. If you use HSL, you brought this on yourself.<br> <fantasai> astearns: given no Blink opinion, shall we resolve to clip all HSL syntaxes?<br> <fantasai> fantasai: All HSL or all HSL except color() ?<br> <fantasai> chris: color() doesn't affect HSL, this is hsl() only<br> <fantasai> PROPOSED: All hsl() clip to non-negative numbers<br> <fantasai> for saturation<br> <fantasai> RESOLVED: All hsl() clip to non-negative numbers for saturation<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9222#issuecomment-1944421144 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 14 February 2024 19:01:06 UTC