csswg/css3-values Overview.html,1.124,1.125 Overview.src.html,1.127,1.128

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

Modified Files:
	Overview.html Overview.src.html 
Log Message:
Remove all mention of 'mod' from calc(), because it doesn't make sense unless there's units on both sides.

Index: Overview.html
===================================================================
RCS file: /sources/public/csswg/css3-values/Overview.html,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -d -r1.124 -r1.125
--- Overview.html	11 Oct 2011 01:25:31 -0000	1.124
+++ Overview.html	11 Oct 2011 01:45:28 -0000	1.125
@@ -1310,9 +1310,8 @@
    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. The &lsquo;<a
+   class=css>*</code>&rsquo;), and division (&lsquo;<code
+   class=css>/</code>&rsquo;) to be used as component values. The &lsquo;<a
    href="#calc0"><code class=css>calc()</code></a>&rsquo; expression
    represents the result of the mathematical calculation it contains, using
    standard precedence operator rules. The &lsquo;<a href="#min"><code
@@ -1324,11 +1323,7 @@
    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
-   href="#number-value"><code>&lt;number&gt;</code></a> values are allowed.
-
-  <p class=issue>What definition of "mod" do we use? Should &lsquo;<code
-   class=css>calc(-3mod5)</code>&rsquo; return &lsquo;<code
-   class=css>-3</code>&rsquo; or &lsquo;<code class=css>2</code>&rsquo;?</p>
+   href="#number-value"><code>&lt;number&gt;</code></a> values are allowed.</p>
   <!-- http://lists.w3.org/Archives/Public/www-style/2010May/0001.html
 	This has notes on how we should handle things when calc() is extended to 
 	handle unit mult/div. Related to this is <unit>mod<unit>, which can return
@@ -1372,15 +1367,15 @@
 min     : "min(" S* sum [ "," S* sum ]* S* ")";
 max     : "max(" S* sum [ "," S* sum ]* S* ")";
 sum     : product [ S+ [ "+" | "-" ] S+ product ]*;
-product : unit [ S* [ "*" | "/" | "mod" ] S* unit ]*;
+product : unit [ S* [ "*" | "/" ] S* unit ]*;
 unit    : ["+"|"-"]? [ NUMBER | DIMENSION | PERCENTAGE |
           min | max | "(" S* sum S* ")" ];</pre>
 
   <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.
+   class=css>*</code>&rsquo; and &lsquo;<code class=css>/</code>&rsquo;
+   operators do not require spaces.
 
   <p>Additionally, the following redefinition is made to the informative
    grammar appearing in <a href="http://www.w3.org/TR/CSS2/grammar.html">CSS
@@ -1432,10 +1427,9 @@
     side is &lsquo;<code class=css>&lt;number></code>&rsquo;; resolve to the
     type of the other side
 
-   <li>At &lsquo;<code class=css>/</code>&rsquo; or &lsquo;<code
-    class=css>mod</code>&rsquo;, check that the right side is &lsquo;<code
-    class=css>&lt;number></code>&rsquo;; resolve to the type of the left
-    side.
+   <li>At &lsquo;<code class=css>/</code>&rsquo;, check that the right side
+    is &lsquo;<code class=css>&lt;number></code>&rsquo;; resolve to the type
+    of the left side.
   </ul>
 
   <p>If an operator does not pass the above checks, the expression is

Index: Overview.src.html
===================================================================
RCS file: /sources/public/csswg/css3-values/Overview.src.html,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- Overview.src.html	11 Oct 2011 01:25:31 -0000	1.127
+++ Overview.src.html	11 Oct 2011 01:45:28 -0000	1.128
@@ -872,9 +872,9 @@
 
 	<p>The <dfn>calc()</dfn>, <dfn>min()</dfn>, and <dfn>max()</dfn> functions
 	allow mathematical expressions with addition (''+''), subtraction (''-''), 
-	multiplication (''*''), division (''/''), and modulus (''mod'') to be used 
+	multiplication (''*''), and division (''/'') to be used 
 	as component values.  The ''calc()'' expression represents the result of the
-	mathematical calculation it contains, using standard precedence operator
+	mathematical calculation it contains, using standard operator precedence
 	rules.  The ''min()'' and ''max()'' expressions represent the minimum and 
 	maximum, respectively, of their comma-separated arguments.  These expressions 
 	can be used wherever
@@ -885,9 +885,6 @@
 	<code>&lt;number&gt;</code>
 	values are allowed.</p>
 
-	<p class='issue'>What definition of "mod" do we use?  Should ''calc(-3mod5)''
-	return ''-3'' or ''2''?</p>
-
 	<!-- http://lists.w3.org/Archives/Public/www-style/2010May/0001.html
 	This has notes on how we should handle things when calc() is extended to 
 	handle unit mult/div. Related to this is <unit>mod<unit>, which can return
@@ -932,12 +929,12 @@
 min     : "min(" S* sum [ "," S* sum ]* S* ")";
 max     : "max(" S* sum [ "," S* sum ]* S* ")";
 sum     : product [ S+ [ "+" | "-" ] S+ product ]*;
-product : unit [ S* [ "*" | "/" | "mod" ] S* unit ]*;
+product : unit [ S* [ "*" | "/" ] S* unit ]*;
 unit    : ["+"|"-"]? [ NUMBER | DIMENSION | PERCENTAGE |
           min | max | "(" S* sum S* ")" ];</pre>
 
 	<p class='note'>Note that the grammar requires spaces around binary ''+'' 
-	and ''-'' operators.  The ''*'', ''/'', and ''mod'' operators do not require 
+	and ''-'' operators.  The ''*'' and ''/'' operators do not require 
 	spaces.</p>
 
 	<p>Additionally, the following redefinition is made to the informative
@@ -979,7 +976,7 @@
 		<li>At ''*'', check that at least one side is ''&lt;number>''; 
 		resolve to the type of the other side</li>
 
-		<li>At ''/'' or ''mod'', check that the right side is ''&lt;number>'';
+		<li>At ''/'', check that the right side is ''&lt;number>'';
 		resolve to the type of the left side.</li>
 	</ul>
 

Received on Tuesday, 11 October 2011 01:45:32 UTC