Skip to content

Commit 0075d48

Browse files
committed
[css-color-4] Serialize lch() as itself, per w3c#5825
1 parent e3c6d7a commit 0075d48

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

css-color-4/Overview.bs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ Resolving <<color>> Values</h3>
548548
This applies to ''lab()'' and ''lch()'' values.
549549

550550
The computed and used value
551-
is the corresponding CIE Lab color
551+
is the corresponding CIE Lab or LCH color
552552
paired with the specified alpha channel
553553
(as a <<number>>, not a <<percentage>>;
554554
and defaulting to opaque if unspecified).
@@ -557,7 +557,7 @@ Resolving <<color>> Values</h3>
557557
<p>For example, the computed value of</p>
558558
<pre class="lang-css"><span class="swatch" style="--color: rgb(77.61% 36.34% 2.45%)"></span> lch(52.2345% 72.2 56.2 / 1)</pre>
559559
<p>is</p>
560-
<pre class="lang-css"><span class="swatch" style="--color: rgb(77.61% 36.34% 2.45%)"></span> lab(52.235% 40.165 59.997)</pre>
560+
<pre class="lang-css"><span class="swatch" style="--color: rgb(77.61% 36.34% 2.45%)"></span> lch(52.2345% 72.2 56.2)</pre>
561561
</div>
562562

563563
<h4 id="resolving-color-function-values">Resolving values of the ''color()'' function</h4>
@@ -815,7 +815,7 @@ and there shall be no thousands separator.
815815

816816
The serialized form of ''lch()'' and ''lab()'' values
817817
is derived from the [=computed value=]
818-
and uses the ''lab()'' form,
818+
and uses the ''lab()'' or ''lch()'' forms,
819819
with lowercase letters for the function name.
820820

821821
The component values are serialized in base 10;
@@ -838,11 +838,9 @@ and there shall be no thousands separator.
838838

839839
<div class="example" id="ex-lch-serial">
840840
<p>The serialized value of</p>
841-
<pre class="lang-css"><span class="swatch" style="--color: rgb(41.66% 15.34% 90.66%)"></span> lch(37% 105 305)</pre>
842-
<p>is the string "lab(37% 60.23 -86.01)"
843-
and not "lab(37.00% 60.23 -86.01)"
844-
or "lab(37.% 60.23 -86.01)"
845-
or "lch(37% 105 305)".
841+
<pre class="lang-css"><span class="swatch" style="--color: rgb(41.66% 15.34% 90.66%)"></span> lch(37% 105.0 305.00)</pre>
842+
<p>is the string "lch(37% 105 305)",
843+
not "lch(37% 105.0 305.00)".
846844
</div>
847845

848846
The precision with which ''lab()'' component values are retained,
@@ -872,7 +870,7 @@ and there shall be no thousands separator.
872870
<div class="example" id="ex-lch-alpha">
873871
<p>The serialized value of</p>
874872
<pre class="lang-css"><span class="swatch" style="--color: rgba(99.56%, 6.09%, 57.02%, 0.93)"></span> lch(56.2% 83.6 357.4 /93%)</pre>
875-
<p>is the string "lab(56.2% 83.51 -3.79 / 0.93)"</p>
873+
<p>is the string "lch(56.2% 83.6 357.4 / 93%)"</p>
876874
</div>
877875

878876
<h4 id="serializing-color-function-values">Serializing values of the ''color()'' function</h4>
@@ -920,8 +918,7 @@ and there shall be no thousands separator.
920918
the serialization is not sufficient because the name and the link to the profile are also needed.
921919
-->
922920

923-
Note: If the colorspace is sRGB, the colorspace is explicitly required in the serialized result.
924-
921+
Note: If the colorspace is sRGB, the colorspace is still explicitly required in the serialized result.
925922

926923
The precision with which ''color()'' component values are retained,
927924
and thus the number of significant figures in the serialized value,

0 commit comments

Comments
 (0)