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

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