Skip to content

Commit ec21e6b

Browse files
committed
Add note about mod with units on both sides, for future reference.
1 parent 5498ef1 commit ec21e6b

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

css3-values/Overview.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,8 @@ <h3 id=calc><span class=secno>9.1. </span> Mathematical Expressions:
13311331
class=css>-3</code>&rsquo; or &lsquo;<code class=css>2</code>&rsquo;?</p>
13321332
<!-- http://lists.w3.org/Archives/Public/www-style/2010May/0001.html
13331333
This has notes on how we should handle things when calc() is extended to
1334-
handle unit mult/div. -->
1334+
handle unit mult/div. Related to this is <unit>mod<unit>, which can return
1335+
0 and thus introduce computed-time division-by-zero. -->
13351336

13361337
<div class=example>
13371338
<pre>
@@ -1433,8 +1434,8 @@ <h3 id=calc><span class=secno>9.1. </span> Mathematical Expressions:
14331434

14341435
<li>At &lsquo;<code class=css>/</code>&rsquo; or &lsquo;<code
14351436
class=css>mod</code>&rsquo;, check that the right side is &lsquo;<code
1436-
class=css>&lt;number></code>&rsquo;; resolve to the type of the left side
1437-
1437+
class=css>&lt;number></code>&rsquo;; resolve to the type of the left
1438+
side.
14381439
</ul>
14391440

14401441
<p>If an operator does not pass the above checks, the expression is

css3-values/Overview.src.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,8 @@ <h3 id="calc">
890890

891891
<!-- http://lists.w3.org/Archives/Public/www-style/2010May/0001.html
892892
This has notes on how we should handle things when calc() is extended to
893-
handle unit mult/div. -->
893+
handle unit mult/div. Related to this is <unit>mod<unit>, which can return
894+
0 and thus introduce computed-time division-by-zero. -->
894895

895896
<div class="example">
896897
<pre>
@@ -979,7 +980,7 @@ <h3 id="calc">
979980
resolve to the type of the other side</li>
980981

981982
<li>At ''/'' or ''mod'', check that the right side is ''&lt;number>'';
982-
resolve to the type of the left side
983+
resolve to the type of the left side.</li>
983984
</ul>
984985

985986
<p>If an operator does not pass the above checks, the expression is invalid.

0 commit comments

Comments
 (0)