diff --git a/css-values-3/Overview.bs b/css-values-3/Overview.bs index 2e3b8600701..78e082906f3 100644 --- a/css-values-3/Overview.bs +++ b/css-values-3/Overview.bs @@ -1740,8 +1740,12 @@ Range Checking Parse-time range-checking of values is not performed within ''calc()'', and therefore out-of-range values do not cause the declaration to become invalid. - However, the used value resulting from an expression + However, the value resulting from an expression must be clamped to the range allowed in the target context. + Clamping is performed on computed values to the extent possible, + and also on used values + if computation was unable to sufficiently simplify the expression + to allow range-checking. Note: This requires all contexts accepting ''calc()'' to define their allowable values as a closed (not open) interval. @@ -2140,6 +2144,9 @@ Changes
  • Reverted previous change to allow zero angles to drop their unit; this will instead be special-cased where needed for backwards-compatibility. (See discussion) +
  • Defined that range checking, and any resulting clamping, of ''calc()'' values + is performed both at computed time and at used time. + (Issue #434)
  • Fixed grammar error that disallowed numeric expressions as denominators in ''calc()''. (Issue 12)
  • Defined handling of font-relative units outside the context of an element. diff --git a/css-values-4/Overview.bs b/css-values-4/Overview.bs index 0beb0957b50..c6fa89cd4c3 100644 --- a/css-values-4/Overview.bs +++ b/css-values-4/Overview.bs @@ -1880,8 +1880,12 @@ Range Checking Parse-time range-checking of values is not performed within [=math functions=], and therefore out-of-range values do not cause the declaration to become invalid. - However, the used value resulting from an expression + However, the value resulting from an expression must be clamped to the range allowed in the target context. + Clamping is performed on computed values to the extent possible, + and also on used values + if computation was unable to sufficiently simplify the expression + to allow range-checking. Note: This requires all contexts accepting ''calc()'' to define their allowable values as a closed (not open) interval.