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

Dealing with specified values in *14. Resolving `<color>` Values* confuses me. 

I would not expect a specified value to resolve. I would expect it to remain (close) to the (tokenized) value as specified by its author. I would only expect *14. Resolve `<color>` Values* to define any transformation on the specified value to resolve the computed value, and any transformation on the computed value to resolve the used value.

In my opinion, for specified value:

  1. `<system-color>` or `<deprecated-color>` should also serialize to the lowercase color name, however I think lowercase color keywords (`<named-color>`, `<system-color>`, `<deprecated-color>`, `transparent`, `currentcolor`) already stems from *serializing a keyword* (CSSOM), therefore it is not strictly required to be defined in CSS Color
  2. mapping `<percentage>` to `<number>` should be defined in *15. Serializing `<color>` Values*

2 is not required for specified values, but this is what browsers are currently doing. Obviously, if `<percentage>` should be mapped to `<number>` for resolved values and when serializing a specified value, it can be done at parse-time for specified values, instead of at serialization time. 

Nevertheless it would be less confusing to define it in *15. Serializing `<color>` Values*. I think there are precedents for this in other specs.

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


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

Received on Thursday, 19 January 2023 20:07:30 UTC