@@ -1740,8 +1740,12 @@ Range Checking</h4>
1740
1740
1741
1741
Parse-time range-checking of values is not performed within ''calc()'' ,
1742
1742
and therefore out-of-range values do not cause the declaration to become invalid.
1743
- However, the used value resulting from an expression
1743
+ However, the value resulting from an expression
1744
1744
must be clamped to the range allowed in the target context.
1745
+ Clamping is performed on computed values to the extent possible,
1746
+ and also on used values
1747
+ if computation was unable to sufficiently simplify the expression
1748
+ to allow range-checking.
1745
1749
1746
1750
Note: This requires all contexts accepting ''calc()''
1747
1751
to define their allowable values as a closed (not open) interval.
@@ -2140,6 +2144,9 @@ Changes</h2>
2140
2144
<li> Reverted previous change to allow zero angles to drop their unit;
2141
2145
this will instead be special-cased where needed for backwards-compatibility.
2142
2146
(See <a href="https://lists.w3.org/Archives/Public/www-style/2017Apr/0027.html">discussion</a> )
2147
+ <li> Defined that range checking, and any resulting clamping, of ''calc()'' values
2148
+ is performed both at computed time and at used time.
2149
+ (<a href="https://github.com/w3c/csswg-drafts/issues/434">Issue #434</a> )
2143
2150
<li> Fixed grammar error that disallowed numeric expressions as denominators in ''calc()'' .
2144
2151
(<a href="https://drafts.csswg.org/css-values-3/issues-cr-2016#issue-12">Issue 12</a> )
2145
2152
<li> Defined handling of font-relative units outside the context of an element.
0 commit comments