@@ -1368,10 +1368,20 @@ <h3 id=calc-notation><span class=secno>8.1. </span> Mathematical
13681368 class =css > calc()</ code > </ a > ’ expression is the expression with all
13691369 components computed, with all multiplication/division subexpressions
13701370 resolved, and with all addition/subtraction subexpressions resolved where
1371- both sides are the same type. < span class =note > Thus, the computed value
1372- of a ‘< a href ="#calc "> < code class =css > calc()</ code > </ a > ’ expression
1373- can be represented as either a number or a tuple of a dimension and a
1374- percentage. </ span >
1371+ both sides are the same type. Where percentages are not resolved at
1372+ computed value, they are not resolved in ‘< a href ="#calc "> < code
1373+ class =css > calc()</ code > </ a > ’ expressions, e.g. ‘< code
1374+ class =css > height: calc(100% - 100% + 1em)</ code > ’ computes to ‘< code
1375+ class =css > height: calc(0% + 1em)</ code > ’, not to ‘< code
1376+ class =css > height: calc(1em)</ code > ’, and, due to containing a percentage
1377+ relative to the height of a containing block that depends on this
1378+ element's height, < a
1379+ href ="http://www.w3.org/TR/CSS21/visudet.html#the-height-property "> is
1380+ treated as ‘< code class =css > auto</ code > ’</ a > . < a href ="#CSS21 "
1381+ rel =biblioentry > [CSS21]<!--{{!CSS21}}--> </ a > < span class =note > Thus, the
1382+ computed value of a ‘< a href ="#calc "> < code
1383+ class =css > calc()</ code > </ a > ’ expression can be represented as either a
1384+ number or a tuple of a dimension and a percentage. </ span >
13751385 <!-- http://lists.w3.org/Archives/Public/www-style/2010May/0001.html
13761386 This has notes on how we should handle things when calc() is extended to
13771387 handle unit mult/div. Related to this is <unit>mod<unit>, which can return
@@ -1474,12 +1484,12 @@ <h4 id=calc-syntax><span class=secno>8.1.1. </span> Syntax</h4>
14741484
14751485 < p > UAs must support ‘< a href ="#calc "> < code
14761486 class =css > calc()</ code > </ a > ’ expressions of at least 20 terms, where
1477- each ‘ < a href ="#number "> < code class = css > number </ code > </ a > ’, ‘ < a
1478- href ="#dimension "> < code class = css > dimension </ code > </ a > ’ , or ‘ < a
1479- href ="#percentage "> < code class = css > percentage </ code > </ a > ’ is a term. If
1480- a ‘ < a href ="#calc "> < code class =css > calc()</ code > </ a > ’ expression
1481- contains more than the supported number of terms, it must be treated as if
1482- it were invalid.
1487+ each < a href ="#number "> < code > NUMBER </ code > </ a > , < a
1488+ href ="#dimension "> < code > DIMENSION </ code > </ a > , or < a
1489+ href ="#percentage "> < code > PERCENTAGE </ code > </ a > is a term. If a ‘ < a
1490+ href ="#calc "> < code class =css > calc()</ code > </ a > ’ expression contains more
1491+ than the supported number of terms, it must be treated as if it were
1492+ invalid.
14831493
14841494 < h4 id =calc-type-checking > < span class =secno > 8.1.2. </ span > Type Checking</ h4 >
14851495
0 commit comments