Re: [csswg-drafts] [css-color-5] Should relative `rgb()`/`rgba()` and relative `hsl()`/`hsla()` serialize exactly as declared? (#10327)

The CSS Working Group just discussed ``[css-color-5] Should relative `rgb()`/`rgba()` and relative `hsl()`/`hsla()` serialize exactly as declared?``, and agreed to the following:

* `RESOLVED: relative rgb()/rgba() and relative hsl()/hsla() serialize as rgb() and hsl() when alpha is unity.`
* `RESOLVED: relative rgb()/rgba() and relative hsl()/hsla() serialize as rgb() and hsl() when alpha is unity or unknown (like with currentColor)`

<details><summary>The full IRC log of that discussion</summary>
&lt;ChrisL> relative rgb()/rgba() and relative hsl()/hsla() serialize as rgb() and hsl() when alpha is unity.<br>
&lt;jarhar> ChrisL: i have a proposed resolution im going to paste it in now<br>
&lt;jarhar> ChrisL: regardless of what you specified, you drop the a<br>
&lt;jarhar> ChrisL: thats consistent with everywhere else i believe<br>
&lt;jarhar> ChrisL: many people said it was fine<br>
&lt;jarhar> fantasai: and this is for the specified value?<br>
&lt;jarhar> ChrisL: the spec says if its one then we drop the a. but i have two and the other one is up for discussion<br>
&lt;jarhar> fantasai: any objections?<br>
&lt;ChrisL> RESOLVED: relative rgb()/rgba() and relative hsl()/hsla() serialize as rgb() and hsl() when alpha is unity.<br>
&lt;jarhar> ChrisL: for the second one theres two ways we could go with<br>
&lt;ChrisL> relative rgb()/rgba() and relative hsl()/hsla() serialize exactly as specified if they use currentcolor, as alpha is unknown.<br>
&lt;jarhar> ChrisL: let me give one possible resolution<br>
&lt;lea> fantasai: I wonder if we could quickly resolve on that accentColor issue since it was brought up anyway and seemed to have general consensus? 😇<br>
&lt;jarhar> ChrisL: so if youre using currentcolor then you dont know what ? is. if you set ? you get rgba, if you set ? you get rgb<br>
&lt;fantasai> s/? you get rgba/rgba you get rgba/<br>
&lt;kbabbitt> s/what ? is/what alpha is/<br>
&lt;fantasai> s/? you get rgb/rgb you get rgb/<br>
&lt;jarhar> ChrisL: the other one is to say that we dont care, we just use the aimiless form beauuse in the modern syntax you can set rgb and then give an alpha. either we eagerly preserve the a's or we get rid of them. i dont have a stron gopinion<br>
&lt;jarhar> florian: we prefer the shortest serialization possible. if you want it the other way around i would be ?, the most important thing is define something<br>
&lt;jarhar> ChrisL: any other opinions?<br>
&lt;florian> s/if you want it the other way around i would be ?/if someone wants it the other way around for some reason i would be fine with it.<br>
&lt;jarhar> fserb: i think there is a use case of people trying to get the color back and this is more work because it may change, maybe we should keep it, but not super strong on this. i think i would favor that<br>
&lt;florian> s/we prefer the shortest /we tend to prefer the shortest<br>
&lt;jarhar> ChrisL: the only argument i had against it  is that you have to keep around exactly what the author typed, but<br>
&lt;jarhar> fserb: its usually eaiser to do the shortest<br>
&lt;jarhar> ChrisL: yeah exactly<br>
&lt;jarhar> fantasai: anybody working on serialization have any idea? emilio?<br>
&lt;jarhar> emilio: like preference for shortest serialization?<br>
&lt;emilio> s/like/slight<br>
&lt;jarhar> fantasai: ok, then does anybody object to that?<br>
&lt;kbabbitt> +1 slight preference for shorter serialization<br>
&lt;jarhar> fserb: for no relative colors do we always do the short version?<br>
&lt;ChrisL> RESOLVED: relative rgb()/rgba() and relative hsl()/hsla() serialize as rgb() and hsl() when alpha is unity or unknown (like with currentColor)<br>
&lt;jarhar> ChrisL: we drop the a<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10327#issuecomment-2162573951 using your GitHub account


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

Received on Wednesday, 12 June 2024 09:44:00 UTC