Re: [csswg-drafts] [css-color-4] Serialization of named colors (#7870)

> **15.2. Serializing sRGB values**
>
> [...]
>  
> When serializing the value of a property which was set by the author to a **CSS named color**, therefore, for the specified value, the (all lowercase) named value is retained.

`<system-color>`, `<deprecated-color>`, `currentColor`, `transparent`, as components of a speficied value, also serialize to the (all lowercase) named value in Chrome/FF.

I do not understand whether `transparent` should serialize to the color name or rgb() from the following:

  > **15.6. Serializing other colors**
  >
  > This applies to `transparent` and `currentcolor`.
  >
  > The serialized form of these values is derived from the computed value and uses ASCII lowercase letters for the color name.
  >
  > The serialized form of `transparent` is the string `rgba(0, 0, 0, 0)`.
  >
  > The serialized form of `currentColor` is the string `currentcolor`.

The following:

  > During serialization, any missing values are converted to 0.

contradicts this:

  > If a color with a missing component is serialized or otherwise presented directly to an author, then for legacy color syntax it represents that component as a zero value

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


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

Received on Sunday, 15 January 2023 13:26:35 UTC