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

karlcow has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-images-4] is serialization from named colors to rgb values is mandatory in general ==
Hello, 

https://drafts.csswg.org/css-images-4/#serialization

says: 

> This section describes the serialization of all new properties and value types introduced in this specification, for the purpose of interfacing with the CSS Object Model [CSSOM].


In https://drafts.csswg.org/css-color-4/#serializing-color-values

It says: 

> This section updates and replaces that part of CSS Object Model, section Serializing CSS Values, which relates to serializing <color> values.


And then later on

> The serialized form of the following sRGB values:
> hex colors
> rgb() and rgba() values
> hsl() and hsla() values
> hwb() values
> named colors
> system colors
> deprecated-colors
> is derived from the computed value and thus, uses either the rgb() or rgba() form (depending on whether the alpha is exactly 1, or not), with lowercase letters for the function name.

**but** the example given in gradient shows: 

> Linear-Gradient( to bottom, red 0%,yellow,black 100px)

is serialized as 

> linear-gradient(red, yellow, black 100px)

Is it just a typo, where the named colors should have been converted to RGB values. Or am I just reading too much?

This is partially raised because some tests are being changed to follow this. 
https://github.com/web-platform-tests/wpt/pull/35864


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7728 using your GitHub account


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

Received on Monday, 12 September 2022 17:42:34 UTC