@@ -5728,12 +5728,6 @@ Serializing sRGB values</h3>
57285728 Thus, any higher precision than eight bits
57295729 is indicated with a fractional part.
57305730
5731- Trailing fractional zeroes in any component values must be omitted;
5732- if the fractional part consists of all zeroes,
5733- the decimal point must also be omitted.
5734- This means that sRGB colors specified with integer component values
5735- will serialize with backwards-compatible integer values.
5736-
57375731 <p id="sRGB-precision">
57385732 The precision with which sRGB component values are retained,
57395733 and thus the number of significant figures in the serialized value,
@@ -5760,6 +5754,12 @@ Serializing sRGB values</h3>
57605754 is the string "rgb(146.06, 107.46, 131.2)".</p>
57615755</div>
57625756
5757+ Trailing fractional zeroes in any component values must be omitted;
5758+ if the fractional part consists of all zeroes,
5759+ the decimal point must also be omitted.
5760+ This means that sRGB colors specified with integer component values
5761+ will serialize with backwards-compatible integer values.
5762+
57635763<div class="example" id="ex-rgb-notrail">
57645764 <p> The serialized computed value of </p>
57655765 <pre class="lang-css"><span class="swatch" style="--color: goldenrod"></span> ''goldenrod'' </pre>
@@ -5785,10 +5785,6 @@ Serializing Lab and LCH values</h3>
57855785 must be used as the separator
57865786 between the component values.
57875787
5788- Trailing fractional zeroes in any component values must be omitted;
5789- if the fractional part consists of all zeroes,
5790- the decimal point must also be omitted.
5791-
57925788 <wpt>
57935789 parsing/color-computed.html
57945790 </wpt>
@@ -5799,6 +5795,10 @@ Serializing Lab and LCH values</h3>
57995795 <p> is the string "lab(56.2 0 83.6)"</p>
58005796 </div>
58015797
5798+ Trailing fractional zeroes in any component values must be omitted;
5799+ if the fractional part consists of all zeroes,
5800+ the decimal point must also be omitted.
5801+
58025802 <div class="example" id="ex-lch-serial">
58035803 <p> The serialized value of</p>
58045804 <pre class="lang-css"><span class="swatch" style="--color: rgb(41.66% 15.34% 90.66%)"></span> lch(37% 105.0 305.00)</pre>
@@ -5856,10 +5856,6 @@ Serializing Oklab and Oklch values</h3>
58565856 must be used as the separator
58575857 between the component values.
58585858
5859- Trailing fractional zeroes in any component values must be omitted;
5860- if the fractional part consists of all zeroes,
5861- the decimal point must also be omitted.
5862-
58635859 <wpt>
58645860 parsing/color-computed.html
58655861 </wpt>
@@ -5874,6 +5870,10 @@ Serializing Oklab and Oklch values</h3>
58745870 </p>
58755871 </div>
58765872
5873+ Trailing fractional zeroes in any component values must be omitted;
5874+ if the fractional part consists of all zeroes,
5875+ the decimal point must also be omitted.
5876+
58775877 <div class="example" id="ex-oklch-serial">
58785878 <p> The serialized value of</p>
58795879 <pre class="lang-css"><span class="swatch" style="--color: rgb(42.07% 49.6% 25.23%)"></span> oklch(56.43% 0.0900 123.40)</pre>
@@ -5940,10 +5940,6 @@ Serializing values of the ''color()'' function</h3>
59405940 between the component values,
59415941 and also between the color space name and the first color component.
59425942
5943- Trailing fractional zeroes in any component values must be omitted;
5944- if the fractional part consists of all zeroes,
5945- the decimal point must also be omitted.
5946-
59475943 <wpt>
59485944 parsing/color-computed.html
59495945 </wpt>
@@ -5958,6 +5954,16 @@ Serializing values of the ''color()'' function</h3>
59585954 </p>
59595955 </div>
59605956
5957+ Trailing fractional zeroes in any component values must be omitted;
5958+ if the fractional part consists of all zeroes,
5959+ the decimal point must also be omitted.
5960+
5961+ <div class="example" id="ex-color-trailzero">
5962+ <p> The serialized value of</p>
5963+ <pre class="lang-css"><span class="swatch" style="--color: rgb(15.06% 71.88% 34.64%)"></span> color(rec2020 0.400 0.660 0.340)</pre>
5964+ <p> is the string "color(rec2020 0.4 0.66 0.34)",
5965+ not "color(rec2020 0.400 0.660 0.340)".
5966+ </div>
59615967
59625968 <!--
59635969 the name in the @color-profile is also lowercased, right?
0 commit comments