@@ -2837,6 +2837,24 @@ is the same as that specified in
2837
2837
Serializing Relative Color Functions
2838
2838
</h3>
2839
2839
2840
+ The serialization of the specified value of a relative color function
2841
+ is a string identifying the color function in all-lowercase,
2842
+ followed by "(from ",
2843
+ followed by the serialization of the specified value of the origin color,
2844
+ followed by a single space,
2845
+ followed by a singly-space-separated list of the arguments to the color function,
2846
+ followed by ")".
2847
+
2848
+ <div class="example" id="ex-serial-rcs-specified-simple">
2849
+ For example, the result of serializing the specified value
2850
+
2851
+ <pre class="lang-css"> OkLcH(from peru l c h)</pre>
2852
+
2853
+ is the string "oklch(from peru l c h)"
2854
+ </div>
2855
+
2856
+ <!-- need a more complex example, and one with calc too -->
2857
+
2840
2858
The serialization of the result of a relative color function
2841
2859
is the resolved value.
2842
2860
@@ -2848,9 +2866,9 @@ The <em>minimum</em> precision for round-tripping
2848
2866
is the same as that specified in
2849
2867
[[css-color-4#serializing-color-function-values]] .
2850
2868
2851
- <div class="example">
2869
+ <div class="example" id="ex-serial-rcs-computed" >
2852
2870
The result of serializing
2853
- <pre> lch(from peru calc(l * 0.8) calc(c * 0.7) calc(h + 180)) </pre>
2871
+ <pre class="lang-css" > lch(from peru calc(l * 0.8) calc(c * 0.7) calc(h + 180)) </pre>
2854
2872
is the string
2855
2873
<span class="swatch" style="--color: rgb(3.12% 50.352% 68.894%)"></span>
2856
2874
"lch(49.80224 37.80819 243.6803)"
0 commit comments