@@ -1352,16 +1352,19 @@ <h3 id=calc-notation><span class=secno>8.1. </span> Mathematical
13521352 href ="#integer-value "> < var > <integer> </ var > </ a > values are allowed.
13531353 Components of a ‘< a href ="#calc "> < code class =css > calc()</ code > </ a > ’
13541354 expression can be literal values, ‘< a href ="#attr "> < code
1355- class =css > attr()</ code > </ a > ’ expressions, or < a
1355+ class =css > attr()</ code > </ a > ’ or ‘< a href ="#calc "> < code
1356+ class =css > calc()</ code > </ a > ’ expressions, or < a
13561357 href ="#percentage-value "> < var > <percentage> </ var > </ a > values that
13571358 resolve to one of the preceding types.
13581359
1359- < p > The computed value of a calc() expression is the expression with all
1360+ < p > The computed value of a ‘< a href ="#calc "> < code
1361+ class =css > calc()</ code > </ a > ’ expression is the expression with all
13601362 components computed, with all multiplication/division subexpressions
13611363 resolved, and with all addition/subtraction subexpressions resolved where
13621364 both sides are the same type. < span class =note > Thus, the computed value
1363- of a calc() expression can be represented as either a number or a tuple of
1364- a dimension and a percentage. </ span >
1365+ of a ‘< a href ="#calc "> < code class =css > calc()</ code > </ a > ’ expression
1366+ can be represented as either a number or a tuple of a dimension and a
1367+ percentage. </ span >
13651368 <!-- http://lists.w3.org/Archives/Public/www-style/2010May/0001.html
13661369 This has notes on how we should handle things when calc() is extended to
13671370 handle unit mult/div. Related to this is <unit>mod<unit>, which can return
@@ -1443,7 +1446,7 @@ <h4 id=calc-syntax><span class=secno>8.1.1. </span> Syntax</h4>
14431446sum : product [ S+ [ "+" | "-" ] S+ product ]*;
14441447product : unit [ S* [ "*" S* unit | "/" S* NUMBER ] ]*;
14451448attr : "attr(" S* wqname [ S+ type-keyword ]? S* [ "," [ unit | calc ] S* ]? ")";
1446- unit : [ NUMBER | DIMENSION | PERCENTAGE | "(" S* sum S* ")" | attr ];</ pre >
1449+ unit : [ NUMBER | DIMENSION | PERCENTAGE | "(" S* sum S* ")" | calc | attr ];</ pre >
14471450
14481451 < p class =note > Note that the grammar requires spaces around binary ‘< code
14491452 class =css > +</ code > ’ and ‘< code class =css > -</ code > ’ operators. The
0 commit comments