Skip to content

Commit 086913f

Browse files
committed
Specify the computed value of calc()
1 parent 5feadbd commit 086913f

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

css3-values/Overview.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,11 +1353,19 @@ <h3 id=calc><span class=secno>8.1. </span> Mathematical Expressions:
13531353
href="#frequency-value"><code>&lt;frequency&gt;</code></a>, <a
13541354
href="#angle-value"><code>&lt;angle&gt;</code></a>, <a
13551355
href="#time-value"><code>&lt;time&gt;</code></a>, or <a
1356-
href="#number-value"><code>&lt;number&gt;</code></a> values are allowed.</p>
1357-
<!-- http://lists.w3.org/Archives/Public/www-style/2010May/0001.html
1356+
href="#number-value"><code>&lt;number&gt;</code></a> values are allowed.
1357+
1358+
<p> The computed value of a calc() expression is the expression with all
1359+
components computed, with all multiplication/division subexpressions
1360+
resolved, and with all addition/subtraction subexpressions resolved where
1361+
both sides are the same type. <span class=note> Thus, the computed value
1362+
of a calc() expression can be represented as a tuple of a number, a
1363+
dimension, and a percentage. </span>
1364+
<!-- http://lists.w3.org/Archives/Public/www-style/2010May/0001.html
13581365
This has notes on how we should handle things when calc() is extended to
13591366
handle unit mult/div. Related to this is <unit>mod<unit>, which can return
13601367
0 and thus introduce computed-time division-by-zero. -->
1368+
13611369

13621370
<div class=example>
13631371
<pre>

css3-values/Overview.src.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,19 @@ <h3 id="calc">
889889
<code>&lt;number&gt;</code>
890890
values are allowed.</p>
891891

892+
<p>
893+
The computed value of a calc() expression is the expression
894+
with all components computed,
895+
with all multiplication/division subexpressions resolved,
896+
and with all addition/subtraction subexpressions resolved where both sides are the same type.
897+
<span class='note'>
898+
Thus, the computed value of a calc() expression can be represented
899+
as a tuple of
900+
a number,
901+
a dimension,
902+
and a percentage.
903+
</span>
904+
892905
<!-- http://lists.w3.org/Archives/Public/www-style/2010May/0001.html
893906
This has notes on how we should handle things when calc() is extended to
894907
handle unit mult/div. Related to this is <unit>mod<unit>, which can return

0 commit comments

Comments
 (0)