Re: [csswg-drafts] [css-color] Should specify that `opacity` is serialized as a number for the specified values (#10426)

I just added

>  This applies to the ''opacity'' property.

> The specified given opacity value is serialized
 as a `<<number>>`, not a `<<percentage>>`.

> This `<<number>>` value is expressed in base ten,
 with the "." character as decimal separator.
 The leading zero must not be omitted.
 Trailing zeroes must be omitted.

> Opacity values outside the range [0,1]
 are preserved, without clamping, in the serialized specified value.

> The precision with which opacity values are retained,
 and thus the number of decimal places in the serialized value,
 is not defined in this specification,
 but must at least be sufficient
 to round-trip integer percentage values.
 Thus, the serialized value must contain
 at least two decimal places
 (unless trailing zeroes have been removed).
 Values must be
 &lt;a href="https://drafts.csswg.org/css-values-4/#combine-integers">rounded 
 towards +∞&lt;/a>, not truncated.


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


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

Received on Wednesday, 16 April 2025 20:27:21 UTC