Re: [csswg-drafts] [css-images-4] is serialization from named colors to rgb values is mandatory in general (#7728)

Probably the prose in https://drafts.csswg.org/css-color-4/#serializing-color-values could be improved. 

Not sure what it should be exactly, but it would be better if there was a clear way of distinguishing in between the two:

Simple example:

```
> document.body.style.color = "red"
> document.body.style.color
< "red"
> window.getComputedStyle(document.body).color
< "rgb(255, 0, 0)"
```

And more complex example for cases like :

```
> document.body.style.background = "linear-gradient(-45deg,red,currentcolor)"
< "linear-gradient(-45deg,red,currentcolor)"
> document.body.style.background
< "linear-gradient(-45deg, red, currentcolor)"
> window.getComputedStyle(document.body).background
```

hmm… huh.

* WebKit: `rgba(0, 0, 0, 0) linear-gradient(-45deg, red, currentcolor) repeat scroll 0% 0% / auto padding-box border-box`
* Gecko: `linear-gradient(-45deg, rgb(255, 0, 0), rgb(0, 0, 0))`
* Blink: `rgba(0, 0, 0, 0) linear-gradient(-45deg, rgb(255, 0, 0), rgb(0, 0, 0)) repeat scroll 0% 0% / auto padding-box border-box`


3 different answers.

-- 
GitHub Notification of comment by karlcow
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7728#issuecomment-1244758232 using your GitHub account


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

Received on Tuesday, 13 September 2022 00:54:57 UTC