- From: Tab Atkins Jr.. via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 10 Oct 2011 22:32:35 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/css3-values In directory hutz:/tmp/cvs-serv23428 Modified Files: Overview.html Overview.src.html Log Message: Formatting fixup, completely editorial. Index: Overview.html =================================================================== RCS file: /sources/public/csswg/css3-values/Overview.html,v retrieving revision 1.106 retrieving revision 1.107 diff -u -d -r1.106 -r1.107 --- Overview.html 10 Oct 2011 22:18:56 -0000 1.106 +++ Overview.html 10 Oct 2011 22:32:33 -0000 1.107 @@ -1316,29 +1316,24 @@ float: left; margin: 1em; border: solid 1px; width: calc(100%/3 - 2*1em - 2*1px); -} -</pre> +}</pre> </div> <div class=example> <pre> p { [...1475 lines suppressed...] - title="used value"><strong>10.3.</strong></a> + <li>used value, <a href="#used-value" + title="used value"><strong>10.3.</strong></a>, <a href="#used-value0" + title="used value"><strong>10.3.</strong></a> - <li>vh, <a href="#vh-unit" title=vh><strong>5.1.2.</strong></a> + <li>vh, <a href="#vh-unit" title=vh><strong>5.1.2.</strong></a> - <li>vm, <a href="#vm-unit" title=vm><strong>5.1.2.</strong></a> + <li>vm, <a href="#vm-unit" title=vm><strong>5.1.2.</strong></a> - <li>vw, <a href="#vw-unit" title=vw><strong>5.1.2.</strong></a> + <li>vw, <a href="#vw-unit" title=vw><strong>5.1.2.</strong></a> - <li>wqname, <a href="#wqname" title=wqname><strong>9.3.</strong></a> + <li>wqname, <a href="#wqname" title=wqname><strong>9.3.</strong></a> + </ul> + <!--end-index--> </ul> - <!--end-index--> Index: Overview.src.html =================================================================== RCS file: /sources/public/csswg/css3-values/Overview.src.html,v retrieving revision 1.109 retrieving revision 1.110 diff -u -d -r1.109 -r1.110 --- Overview.src.html 10 Oct 2011 22:18:56 -0000 1.109 +++ Overview.src.html 10 Oct 2011 22:32:33 -0000 1.110 @@ -877,42 +877,37 @@ values are allowed. -<div class="example"> -<pre> + <div class="example"> + <pre> section { float: left; margin: 1em; border: solid 1px; width: calc(100%/3 - 2*1em - 2*1px); -} -</pre> -</div> +}</pre> + </div> -<div class="example"> -<pre> + <div class="example"> + <pre> p { margin: calc(1rem - 2px) calc(1rem - 1px); -} -</pre> -</div> +}</pre> + </div> -<div class="example"> -<pre> + <div class="example"> + <pre> p { font-size: min(10px, 3em) } -blockquote { font-size: max(30px, 3em) } -</pre> -</div> +blockquote { font-size: max(30px, 3em) }</pre> + </div> -<div class="example"> -<pre> -.box { width: min(10% + 20px, 300px) } -</pre> -</div> + <div class="example"> + <pre>.box { width: min(10% + 20px, 300px) }</pre> + </div> -<p>The expression language of these functions is described by -the grammar and prose below. + <p>The expression language of these functions is described by + the grammar and prose below. -<pre> + <pre> S : calc | min | max; calc : "calc(" S* sum ")" S*; min : "min(" S* sum [ "," S* sum ]* ")" S*; @@ -920,62 +915,62 @@ sum : product [ [ "+" | "-" ] S* product ]*; product : unit [ [ "*" | "/" | "mod" ] S* unit ]*; unit : ["+"|"-"]? [ NUMBER S* | DIMENSION S* | PERCENTAGE S* | - min | max | "(" S* sum ")" S* ]; -</pre> + min | max | "(" S* sum ")" S* ];</pre> -<p>The context of the expression imposes a target type, which is one -of length, frequency, angle, time, or number. NUMBER tokens are of -type number. DIMENSION tokens have types of their units ('cm' is -length, 'deg' is angle etc.); any DIMENSION whose type does not match -the target type causes the ''calc()'' expression to be invalid. If -percentages are accepted in that context and convertible to the target -type, a PERCENTAGE token in the expression has the target type; -otherwise percentages are likewise invalid. + <p>The context of the expression imposes a target type, which is one + of length, frequency, angle, time, or number. NUMBER tokens are of + type number. DIMENSION tokens have types of their units ('cm' is + length, 'deg' is angle etc.); any DIMENSION whose type does not match + the target type causes the ''calc()'' expression to be invalid. If + percentages are accepted in that context and convertible to the target + type, a PERCENTAGE token in the expression has the target type; + otherwise percentages are likewise invalid. -<p>To make expressions simpler, operators have restrictions on the -types they accept. At each operator, the types of the left and right -side are be checked for these restrictions. If compatible, they -return roughly as follows (the following ignores precedence rules on -the operators for simplicity): + <p>To make expressions simpler, operators have restrictions on the + types they accept. At each operator, the types of the left and right + side are be checked for these restrictions. If compatible, they + return roughly as follows (the following ignores precedence rules on + the operators for simplicity): -<ol> -<li>At ",", "+", "-":<br> - check: both sides have the same type<br> - return: that type -<li>At "*":<br> - check: at least one side is "number" <br> - return: the type of the other side -<li>At "/":<br> - check: right side is "number"<br> - return: the type of the left side -</ol> + <ul> + <li>At ",", "+", "-":<br> + check: both sides have the same type<br> + return: that type</li> + + <li>At "*":<br> + check: at least one side is "number" <br> + return: the type of the other side</li> + + <li>At "/":<br> + check: right side is "number"<br> + return: the type of the left side + </ol> <p>Division by zero is not allowed. Declarations containing such a construct are invalid and must be <a href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignored</a>. -<p>The value resulting from an expression must be clamped to the -range allowed in the target context. + <p>The value resulting from an expression must be clamped to the + range allowed in the target context. <p class="note">Note this requires all contexts accepting ''calc()'' to define their allowable values as a closed (not open) interval. -<div class=example> -These two are equivalentequivalent to 'width: 0px' since widths -smaller than 0px are not allowed. + <div class=example> + <p>These two are equivalent to 'width: 0px' since widths + smaller than 0px are not allowed. -<pre> + <pre> width: calc(5px - 10px); -width: 0px; -</pre> -</div> +width: 0px;</pre> + </div> -<p>Given the complexities of 'width' and 'height' on table cells and - table elements, calc() expressions for widths and heights on table - columns, table column groups, table rows, table row groups, and - table cells in both auto and fixed layout tables may be treated as if - 'auto' had been specified. + <p>Given the complexities of 'width' and 'height' on table cells and + table elements, calc() expressions for widths and heights on table + columns, table column groups, table rows, table row groups, and + table cells in both auto and fixed layout tables may be treated as if + 'auto' had been specified. <h3 id="cycle"> Cycling Values: ''cycle()''</h3>
Received on Monday, 10 October 2011 22:32:38 UTC