Re: [csswg-drafts] [css-color-5] Should colors nested in a parent color function (RCS, color-mix, light-dark, color-contrast) serialize in their most precision saving form (#10328)

  > Leaving this open to remind me to harvest more examples

The following was suggested [above](https://github.com/w3c/csswg-drafts/issues/10328#issuecomment-2325779259):

  - channel values should be normalized to `<number>`
  - `<alpha-value>` should be normalized to `<number>`, clamped, and possibly omitted

For example, `lch(from red 50% -50% 540deg / 150%)` would serialize with `lch(from red 50 -50 180)` as a component of a declared value.

This is already similar with absolute color functions. For example, as a component of a declared value, `lch(50% -50% 540deg / 150%)` serializes with `lch(50 0 180)` in all browsers:

  - channel values must be normalized to `<number>` **and clamped**
  - `<alpha-value>` must be normalized to `<number>`, clamped, and possibly omitted

Can you please tell me if this suggestion is rejected?

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


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

Received on Monday, 17 March 2025 14:24:35 UTC