Skip to content

Commit 6181007

Browse files
committed
[css-color-4] Missing in rgb serializes as 0, fix #6959
1 parent 1d25ec1 commit 6181007

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

css-color-4/Overview.bs

+6-1
Original file line numberDiff line numberDiff line change
@@ -1059,13 +1059,18 @@ and there shall be no thousands separator.
10591059
(depending on whether the alpha is exactly 1, or not),
10601060
with lowercase letters for the function name.
10611061

1062+
During serialization,
1063+
any [=missing=] values
1064+
are converted to 0.
1065+
10621066
For compatibility, the sRGB component values
10631067
are serialized in <<number>> form, not <<percentage>>).
10641068
Also for compatibility,
10651069
the component values are serialized in base 10,
10661070
with a range of [0-255], regardless of
10671071
the bit depth with which they are stored.
10681072

1073+
10691074
<a href="#serializing-alpha-values">As noted earlier</a>,
10701075
unitary alpha values are not explicitly serialized.
10711076
Also, for compatibility, if the alpha is exactly 1,
@@ -1075,7 +1080,6 @@ and there shall be no thousands separator.
10751080
with an explicit alpha value.
10761081

10771082

1078-
10791083
For compatibility,
10801084
the legacy form with comma separators is used;
10811085
exactly one ASCII space follows each comma.
@@ -1084,6 +1088,7 @@ and there shall be no thousands separator.
10841088
from the alpha value.
10851089

10861090

1091+
10871092
<div class="example" id="ex-rgb-ser-int-rgba">
10881093
<p>For example, the serialized value of</p>
10891094
<pre class="lang-css"><span class="swatch" style="--color: rgba(29, 164, 192, 0.95)"></span> rgb(29 164 192 / 95%)</pre>

0 commit comments

Comments
 (0)