@@ -1506,6 +1506,13 @@ Computed Value</h4>
1506
1506
as either a number
1507
1507
or a tuple of a dimension and a percentage.
1508
1508
1509
+ If this resolution process results in only a single value
1510
+ (one <<number>> , one <<dimension>> , or one <<percentage>> ),
1511
+ the computed value is just that value,
1512
+ not a ''calc()'' containing that value.
1513
+ If this value is outside the allowed range for the context,
1514
+ it must be clamped to the nearest allowed value.
1515
+
1509
1516
<div class='example'>
1510
1517
For example, 'background-position' has special behavior for percentage values, different from lengths:
1511
1518
@@ -1583,12 +1590,7 @@ Serialization</h4>
1583
1590
The result must be a summation of unique incompatible units.
1584
1591
(Terms with a value of zero <strong> must</strong> be preserved in this summation.)
1585
1592
1586
- 2. If the result is a single value,
1587
- clamp the value to the range allowed in the target context,
1588
- then serialize as that value,
1589
- discarding the ''calc()'' wrapper.
1590
-
1591
- 3. Otherwise, serialize as a ''calc()'' containing the summation,
1593
+ 2. Serialize as a ''calc()'' containing the summation,
1592
1594
with the units ordered <a>ASCII case-insensitive</a> alphabetically,
1593
1595
numbers coming before all units,
1594
1596
and percentages coming after all units.
0 commit comments