Re: [csswg-drafts] [css-color][cssom] Serialization of specified <color> values (#1004)

The CSS Working Group just discussed `Serialization of specified <color> values`, and agreed to the following:

* `RESOLVED: if the color has non-1 alpha, use the rgba() function`

<details><summary>The full IRC log of that discussion</summary>
&lt;gregwhitworth> Topic: Serialization of specified &lt;color> values<br>
&lt;astearns> github: https://github.com/w3c/csswg-drafts/issues/1004<br>
&lt;gregwhitworth> chris: we already have a resolution to move serialization out of OM into color<br>
&lt;gregwhitworth> chris: we don't have how to do that with RGB and I need that<br>
&lt;TabAtkins> minor testcase: http://software.hixie.ch/utilities/js/live-dom-viewer/saved/8611<br>
&lt;TabAtkins> Shows Chrome and Firefox agreeing on serializing specified values to the legacy rgba()-with-commas syntax<br>
&lt;gregwhitworth> chris: we've already decided since impl determine it's 8 bit we resolve it's in a 255 space; and that's fine<br>
&lt;gregwhitworth> chris: if you have a fully opaque color you can miss out on the alpha channel<br>
&lt;gregwhitworth> chris: we don't resolve on always using rgba; nor to always use commas, etc<br>
&lt;chris> https://drafts.csswg.org/css-color/#resolving-color-values<br>
&lt;gregwhitworth> chris: if you look at section 4.6 I have put what I believe to be the current consensus in there<br>
&lt;gregwhitworth> chris: showing that you can use decimals in the rgb values and what it maps to<br>
&lt;gregwhitworth> chris: how that works with integers and others with commas<br>
&lt;gregwhitworth> chris: which way do people want?<br>
&lt;gregwhitworth> TabAtkins: I thought we discussed this before - and we leaned towards compat due to so much color parsing out there<br>
&lt;gregwhitworth> chris: I'm fine with that<br>
&lt;gregwhitworth> Proposed Resolution: Serialize RGB and RGBA with commas<br>
&lt;gregwhitworth> Resolved: Serialize RGB and RGBA with commas<br>
&lt;TabAtkins> proposed resolution: if the color has non-1 alpha, use the rgba() function<br>
&lt;gregwhitworth> astearns: and this matches all browsers?<br>
&lt;gregwhitworth> TabAtkins: Chrome &amp; FF<br>
&lt;gregwhitworth> RESOLVED: if the color has non-1 alpha, use the rgba() function<br>
&lt;bkardell_> WebKit output of the test TabAtkins embdedded above https://www.irccloud.com/pastebin/sCLw0tYI/<br>
&lt;gregwhitworth> chris: it's clear it's little r, little g, little b<br>
&lt;TabAtkins> http://software.hixie.ch/utilities/js/live-dom-viewer/saved/8613<br>
&lt;gregwhitworth> chris: but if you spell it currentColor should you get CurrentColor, currentColor, etc<br>
&lt;gregwhitworth> TabAtkins: tab discusses interop: FF gives back specified, Chrome gives it canonical form<br>
&lt;gregwhitworth> chris: anyone from Mozilla willing to sign up to change the serilization behavior?<br>
&lt;gregwhitworth> astearns: I'm fine specifying lower case<br>
&lt;gregwhitworth> chris: there's an example where you type in a name and you get back the name and you get RGB value<br>
&lt;gregwhitworth> TabAtkins: in computed value, only specified value<br>
&lt;emilio_> Firefox's behavior is just an accident of this "preserve the specified keyword" for color keywords like "blue"<br>
&lt;gregwhitworth> TabAtkins: specified values is woefully underspecified<br>
&lt;gregwhitworth> TabAtkins: since we know color has quirks here we should reference that<br>
&lt;emilio_> Which is an special case that all browsers seem to share<br>
&lt;TabAtkins> Notably, "CurrentColor" serializes in lowercase *everywhere*, including Firefox<br>
&lt;gregwhitworth> Proposed Resolution: Add some text about specified values and color keywords in specified and computed are given in lowercase<br>
&lt;gregwhitworth> Resolved: Add some text about specified values and color keywords in specified and computed are given in lowercase<br>
&lt;gregwhitworth> chris: can we close this topic and keep talking about this topic briefly?<br>
</details>


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


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

Received on Thursday, 22 October 2020 14:39:34 UTC