csswg/css3-values Overview.html,1.111,1.112 Overview.src.html,1.114,1.115

Update of /sources/public/csswg/css3-values
In directory hutz:/tmp/cvs-serv1916

Modified Files:
	Overview.html Overview.src.html 
Log Message:
Editorial tweaks to calc()

Index: Overview.html
===================================================================
RCS file: /sources/public/csswg/css3-values/Overview.html,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -d -r1.111 -r1.112
--- Overview.html	10 Oct 2011 23:36:37 -0000	1.111
+++ Overview.html	10 Oct 2011 23:47:14 -0000	1.112
@@ -278,8 +278,8 @@
    <li><a href="#functional-notation"><span class=secno>9. </span> Functional
     Notations</a>
     <ul class=toc>
-     <li><a href="#calc"><span class=secno>9.1. </span> Calculations:
-      &lsquo;<code class=css>calc()</code>&rsquo;, &lsquo;<code
+     <li><a href="#calc"><span class=secno>9.1. </span> Mathematical
+      Expressions: &lsquo;<code class=css>calc()</code>&rsquo;, &lsquo;<code
       class=css>min()</code>&rsquo; and &lsquo;<code
       class=css>max()</code>&rsquo;</a>
 
@@ -782,11 +782,11 @@
    &lsquo;<a href="#percentage-value"><code
    class=css>&lt;percentage&gt;</code></a>&rsquo; type</h3>
 
-  <p>A percentage value is denoted by <dfn
+  <p>A <dfn id=percentage>percentage</dfn> value is denoted by <dfn
    id=percentage-value><code>&lt;percentage&gt;</code></dfn>, consists of a
    <a href="#number-value"><i>&lt;number&gt;</i></a> immediately followed by
    a percent sign &lsquo;<code class=css>%</code>&rsquo;. It corresponds to
-   the <code>PERCENTAGE</code> token in the <a
+   the <a href="#percentage"><code>PERCENTAGE</code></a> token in the <a
    href="http://www.w3.org/TR/CSS21/syndata.html#tokenization">grammar</a>.
 
   <p>Percentage values are always relative to another value, for example a
@@ -1297,15 +1297,19 @@
 <!-- -->content: counter(list-item) ". ";
 <!-- -->width: calc(50% - 2em);</pre>
 
-  <h3 id=calc><span class=secno>9.1. </span> Calculations: &lsquo;<a
-   href="#calc0"><code class=css>calc()</code></a>&rsquo;, &lsquo;<a
-   href="#min"><code class=css>min()</code></a>&rsquo; and &lsquo;<a
-   href="#max"><code class=css>max()</code></a>&rsquo;</h3>
+  <h3 id=calc><span class=secno>9.1. </span> Mathematical Expressions:
+   &lsquo;<a href="#calc0"><code class=css>calc()</code></a>&rsquo;,
+   &lsquo;<a href="#min"><code class=css>min()</code></a>&rsquo; and
+   &lsquo;<a href="#max"><code class=css>max()</code></a>&rsquo;</h3>
 
   <p>The <dfn id=calc0>calc()</dfn>, <dfn id=min>min()</dfn>, and <dfn
-   id=max>max()</dfn> functions allow mathematical expressions to be used as
-   component values. They can be used wherever <a
-   href="#length-value"><code>&lt;length&gt;</code></a>, <a
+   id=max>max()</dfn> functions allow mathematical expressions with addition
+   (&lsquo;<code class=css>+</code>&rsquo;), subtraction (&lsquo;<code
+   class=css>-</code>&rsquo;), multiplication (&lsquo;<code
+   class=css>*</code>&rsquo;), division (&lsquo;<code
+   class=css>/</code>&rsquo;), and modulus (&lsquo;<code
+   class=css>mod</code>&rsquo;) to be used as component values. They can be
+   used wherever <a href="#length-value"><code>&lt;length&gt;</code></a>, <a
    href="#frequency-value"><code>&lt;frequency&gt;</code></a>, <a
    href="#angle-value"><code>&lt;angle&gt;</code></a>, <a
    href="#time-value"><code>&lt;time&gt;</code></a>, or <a
@@ -1337,6 +1341,9 @@
    <pre>.box { width: min(10% + 20px, 300px) }</pre>
   </div>
 
+  <p class=issue>Add less trivial examples, particularly involving parens or
+   nesting.
+
   <p>The expression language of these functions is described by the grammar
    and prose below.
 
@@ -1350,22 +1357,26 @@
 unit    : ["+"|"-"]? [ NUMBER | DIMENSION | PERCENTAGE |
           min | max | "(" S* sum S* ")" ];</pre>
 
-  <div class=note>
-   <p>Additionally, the following redefinition is made to the informative
-    grammar appearing in <a href="http://www.w3.org/TR/CSS2/grammar.html">CSS
-    2.1 Appendix G</a>:</p>
+  <p class=note>Note that the grammar requires spaces around binary
+   &lsquo;<code class=css>+</code>&rsquo; and &lsquo;<code
+   class=css>-</code>&rsquo; operators. The &lsquo;<code
+   class=css>*</code>&rsquo;, &lsquo;<code class=css>/</code>&rsquo;, and
+   &lsquo;<code class=css>mod</code>&rsquo; operators do not require spaces.
 
-   <pre>
+  <p>Additionally, the following redefinition is made to the informative
+   grammar appearing in <a href="http://www.w3.org/TR/CSS2/grammar.html">CSS
+   2.1 Appendix G</a>:
+
+  <pre>
 term
   : unary_operator?
     [ NUMBER S* | PERCENTAGE S* | LENGTH S* | EMS S* | EXS S* | ANGLE S* |
       TIME S* | FREQ S* ]
   | STRING S* | IDENT S* | URI S* | hexcolor | function<ins> | math</ins>
   ;</pre>
-  </div>
 
-  <p>The expression has a <dfn id=resolved-type>resolved type</dfn>, which is
-   one of &lsquo;<code class=css>&lt;length></code>&rsquo;, &lsquo;<code
+  <p>A math expression has a <dfn id=resolved-type>resolved type</dfn>, which
+   is one of &lsquo;<code class=css>&lt;length></code>&rsquo;, &lsquo;<code
    class=css>&lt;frequency></code>&rsquo;, &lsquo;<code
    class=css>&lt;angle></code>&rsquo;, &lsquo;<code
    class=css>&lt;time></code>&rsquo;, or &lsquo;<code
@@ -1381,9 +1392,10 @@
    class=css>&lt;length></code>&rsquo;, &lsquo;<a href="#deg"><code
    class=css>deg</code></a>&rsquo; is &lsquo;<code
    class=css>&lt;angle></code>&rsquo;, etc.). If percentages are accepted in
-   the context in which the expression is placed, a <code>PERCENTAGE</code>
-   token has the type of the value that percentages are relative to;
-   otherwise, an expression containing percentages is invalid.
+   the context in which the expression is placed, a <a
+   href="#percentage"><code>PERCENTAGE</code></a> token has the type of the
+   value that percentages are relative to; otherwise, a math expression
+   containing percentages is invalid.
 
   <p>Operators form sub-expressions, which gain types based on their
    arguments. To make expressions simpler, operators have restrictions on the
@@ -1427,7 +1439,7 @@
   </div>
 
   <p>Given the complexities of width and height calculations on table cells
-   and table elements, expressions involving percentages for widths and
+   and table elements, math expressions involving percentages 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 &lsquo;<code class=property>auto</code>&rsquo; had been
@@ -2309,6 +2321,9 @@
    <li><a href="#number-value"><code>&lt;number&gt;</code></a>, <a
     href="#number-value" title="&lt;number&gt;"><strong>4.2.</strong></a>
 
+   <li>percentage, <a href="#percentage"
+    title=percentage><strong>4.3.</strong></a>
+
    <li><a href="#percentage-value"><code>&lt;percentage&gt;</code></a>, <a
     href="#percentage-value"
     title="&lt;percentage&gt;"><strong>4.3.</strong></a>

Index: Overview.src.html
===================================================================
RCS file: /sources/public/csswg/css3-values/Overview.src.html,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- Overview.src.html	10 Oct 2011 23:36:37 -0000	1.114
+++ Overview.src.html	10 Oct 2011 23:47:14 -0000	1.115
@@ -449,7 +449,7 @@
 <h3 id="percentages">
 Percentages: the ''&lt;percentage&gt;'' type</h3>
 
-	<p>A percentage value is denoted by
+	<p>A <dfn>percentage</dfn> value is denoted by
 	<dfn id="percentage-value"><code>&lt;percentage&gt;</code></dfn>, 
 	consists of a <i>&lt;number&gt;</i> immediately followed by a percent
 	sign ''%''. It corresponds to the <code>PERCENTAGE</code> token in the
@@ -865,11 +865,12 @@
 <!-- -->width: calc(50% - 2em);</pre>
 
 <h3 id="calc">
-Calculations: ''calc()'', ''min()'' and ''max()''</h3>
+Mathematical Expressions: ''calc()'', ''min()'' and ''max()''</h3>
 
 	<p>The <dfn>calc()</dfn>, <dfn>min()</dfn>, and <dfn>max()</dfn> functions
-	allow mathematical expressions to be used as component values.  They
-	can be used wherever
+	allow mathematical expressions with addition (''+''), subtraction (''-''), 
+	multiplication (''*''), division (''/''), and modulus (''mod'') to be used 
+	as component values.  They can be used wherever
 	<code>&lt;length&gt;</code>,
 	<code>&lt;frequency&gt;</code>,
 	<code>&lt;angle&gt;</code>,
@@ -903,6 +904,9 @@
 		<pre>.box { width: min(10% + 20px, 300px) }</pre>
 	</div>
 
+	<p class='issue'>Add less trivial examples, particularly involving parens
+	or nesting.</p>
+
 
 	<p>The expression language of these functions is described by
 	the grammar and prose below.
@@ -917,21 +921,23 @@
 unit    : ["+"|"-"]? [ NUMBER | DIMENSION | PERCENTAGE |
           min | max | "(" S* sum S* ")" ];</pre>
 
-	<div class='note'>
-		<p>Additionally, the following redefinition is made to the informative
-		grammar appearing in 
-		<a href="http://www.w3.org/TR/CSS2/grammar.html">CSS 2.1 Appendix G</a>:</p>
+	<p class='note'>Note that the grammar requires spaces around binary ''+'' 
+	and ''-'' operators.  The ''*'', ''/'', and ''mod'' operators do not require 
+	spaces.</p>
 
-		<pre>
+	<p>Additionally, the following redefinition is made to the informative
+	grammar appearing in 
+	<a href="http://www.w3.org/TR/CSS2/grammar.html">CSS 2.1 Appendix G</a>:</p>
+
+	<pre>
 term
   : unary_operator?
     [ NUMBER S* | PERCENTAGE S* | LENGTH S* | EMS S* | EXS S* | ANGLE S* |
       TIME S* | FREQ S* ]
   | STRING S* | IDENT S* | URI S* | hexcolor | function<ins> | math</ins>
   ;</pre>
-	</div>
 
-	<p>The expression has a <dfn>resolved type</dfn>, which is one of
+	<p>A math expression has a <dfn>resolved type</dfn>, which is one of
 	''&lt;length>'', ''&lt;frequency>'', ''&lt;angle>'', ''&lt;time>'', or
 	''&lt;number>''.  The <i>resolved type</i> must be valid for where the 
 	expression is placed; otherwise, the expression is invalid.  
@@ -941,7 +947,7 @@
 	by its unit (''cm'' is ''&lt;length>'', ''deg'' is ''&lt;angle>'', etc.).
 	If percentages are accepted in the context in which the expression
 	is placed, a <code>PERCENTAGE</code> token has the type of the value that 
-	percentages are relative to; otherwise, an expression containing
+	percentages are relative to; otherwise, a math expression containing
 	percentages is invalid.</p>
 
 	<p>Operators form sub-expressions, which gain types based on their arguments.
@@ -981,9 +987,9 @@
 	</div>
 
 	<p>Given the complexities of width and height calculations on table cells 
-	and table elements, expressions involving percentages 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
+	and table elements, math expressions involving percentages 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>
 
 <h3 id="cycle">

Received on Monday, 10 October 2011 23:47:19 UTC