W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2017

[csswg-drafts] [css-color][cssom] Serialization of specified <color> values

From: Xidorn Quan via GitHub <sysbot+gh@w3.org>
Date: Mon, 06 Feb 2017 03:26:00 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-205480451-1486351559-sysbot+gh@w3.org>
upsuper has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-color][cssom] Serialization of specified <color> values ==
CSSOM spec defines the way to serialize resolved `<color>` values (to 
rgb and rgba functions), but nothing defines how specified `<color>` 
values should be specified, and it seems the existing implementations 
are rather complicated.

It seems to me that all browsers agree on the following things:
* `#008000` -> `rgb(0, 128, 0)`
* `RGB(0, 128, 0)` -> `rgb(0, 128, 0)`
* `green` -> `green`
* `CURRENTcolor` -> `currentcolor` / `currentColor`

Some differences:
* `rgba(0, 128, 0, 1)` -> Edge: `rgba(0, 128, 0, 1)`, Gecko & Blink: 
`rgb(0, 128, 0)`
* `GrEeN` -> Edge & Blink: `green`, Gecko: `GrEeN`

I think for the last case, Gecko is inconsistent to itself, so it's 
probably wrong. I'm less sure about the first difference, though.

Anyway, there doesn't seem to be any speced serialization algorithm 
does this. It should probably be put somewhere.

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/1004 using your GitHub 
account
Received on Monday, 6 February 2017 03:26:06 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:30:28 UTC