Skip to content

Commit 6961bf3

Browse files
committed
Make it clear that dividing by an expression that evaluates to 0 is invalid in calc().
1 parent 5fba180 commit 6961bf3

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

css3-values/Overview.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,10 @@ <h3 id=calc><span class=secno>9.1. </span> Mathematical Expressions:
14391439
</ul>
14401440

14411441
<p>If an operator does not pass the above checks, the expression is
1442-
invalid. Also, division by zero is invalid.
1442+
invalid. Also, division by zero is invalid. This includes both dividing by
1443+
the literal number zero, as well as any numeric expression that evaluates
1444+
to zero (as purely-numeric expressions can be evaluated without any
1445+
additional information at parse time).
14431446

14441447
<p>The value resulting from an expression must be clamped to the range
14451448
allowed in the target context.

css3-values/Overview.src.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,10 @@ <h3 id="calc">
984984
</ul>
985985

986986
<p>If an operator does not pass the above checks, the expression is invalid.
987-
Also, division by zero is invalid.</p>
987+
Also, division by zero is invalid. This includes both dividing by the
988+
literal number zero, as well as any numeric expression that evaluates to zero
989+
(as purely-numeric expressions can be evaluated without any additional
990+
information at parse time).</p>
988991

989992
<p>The value resulting from an expression must be clamped to the
990993
range allowed in the target context.

0 commit comments

Comments
 (0)