Re: [csswg-drafts] [css-color] Clamping alpha at computed-value time vs parsing time (#7677)

> [CSSOM](https://drafts.csswg.org/cssom-1/#ref-for-alphavalue-def) defines how to serialize <alphavalue> (aside: note the missing - between "alpha" and "value") as an 8-bit integer (between 0 and 255). This might be the (historical) reason why browsers do clamping at parse time, as noted in [15.2 Serializing sRGB values](https://drafts.csswg.org/css-color-4/#serializing-sRGB-values):

All the color serialization stuff got moved from CSSOM to Color 4. It makes sense to move the alpha serialization as well.

The legacy forms and the newer `color()`, `oklab()` etc have different compatibility constraints of course.

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


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

Received on Monday, 5 September 2022 12:01:40 UTC