Skip to content

Commit fb101d6

Browse files
committed
[css-color-4] Updates serialization of origin colors #10328
1 parent 3c28dd9 commit fb101d6

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

css-color-5/Overview.bs

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3243,13 +3243,12 @@ The serialization of the declared value of a relative color is:
32433243
followed by a single space,
32443244
followed by a space separated list of the non-alpha channel arguments as specified
32453245
(identifiers serializing as identifiers,
3246-
numbers serializing as numbers,
3247-
percentages serializing as percentages,
3246+
numbers and percentages serializing as numbers,
32483247
angles serializing as canonicalized angles in degrees,
32493248
calc() serializing in its simplified form),
3250-
followed by " / " and the alpha component as specified
3251-
(using the same rules as the color channel arguments)
3252-
if an alpha component is present,
3249+
followed (if the alpha component is non-unity)
3250+
by " / " and the alpha component as specified
3251+
(using the same rules as the color channel arguments, but clamped)
32533252
followed by ")".
32543253

32553254
2. For ''hwb()'', ''lab()'', ''lch()'', ''oklab()'', ''oklch()''
@@ -3259,7 +3258,7 @@ The serialization of the declared value of a relative color is:
32593258
followed by the <a href="#serial-origin-color">serialization of the origin color</a>
32603259
using the rules for serializing nested origin colors,
32613260
followed by a single space,
3262-
followed by a space separated list of the non-alpha channel arguments as specified
3261+
<!-- followed by a space separated list of the non-alpha channel arguments as specified
32633262
(identifiers serializing as identifiers,
32643263
numbers serializing as numbers,
32653264
percentages serializing as percentages,
@@ -3268,6 +3267,15 @@ The serialization of the declared value of a relative color is:
32683267
followed by " / " and the alpha component as specified
32693268
(using the same rules as the color channel arguments)
32703269
if an alpha component is present,
3270+
followed by ")". -->
3271+
followed by a space separated list of the non-alpha channel arguments as specified
3272+
(identifiers serializing as identifiers,
3273+
numbers and percentages serializing as numbers,
3274+
angles serializing as canonicalized angles in degrees,
3275+
calc() serializing in its simplified form),
3276+
followed (if the alpha component is non-unity)
3277+
by " / " and the alpha component as specified
3278+
(using the same rules as the color channel arguments, but clamped)
32713279
followed by ")".
32723280

32733281
3. For ''color()''
@@ -3279,15 +3287,14 @@ The serialization of the declared value of a relative color is:
32793287
followed by the canonical colorspace ("xyz-d65" for "xyz")
32803288
in all-lowercase,
32813289
followed by a single space,
3282-
followed by space separated list of the non-alpha channel arguments as specified
3290+
followed by a space separated list of the non-alpha channel arguments as specified
32833291
(identifiers serializing as identifiers,
3284-
numbers serializing as numbers,
3285-
percentages serializing as percentages,
3292+
numbers and percentages serializing as numbers,
32863293
angles serializing as canonicalized angles in degrees,
32873294
calc() serializing in its simplified form),
3288-
followed by " / " and the alpha component as specified
3289-
(using the same rules as the color channel arguments)
3290-
if an alpha component is present,
3295+
followed (if the alpha component is non-unity)
3296+
by " / " and the alpha component as specified
3297+
(using the same rules as the color channel arguments, but clamped)
32913298
followed by ")".
32923299

32933300

0 commit comments

Comments
 (0)