- From: Tab Atkins Jr.. via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 11 Oct 2011 01:45:30 +0000
- To: public-css-commits@w3.org
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 (‘<code class=css>+</code>’), subtraction (‘<code class=css>-</code>’), multiplication (‘<code - class=css>*</code>’), division (‘<code - class=css>/</code>’), and modulus (‘<code - class=css>mod</code>’) to be used as component values. The ‘<a + class=css>*</code>’), and division (‘<code + class=css>/</code>’) to be used as component values. The ‘<a href="#calc0"><code class=css>calc()</code></a>’ expression represents the result of the mathematical calculation it contains, using standard precedence operator rules. The ‘<a href="#min"><code @@ -1324,11 +1323,7 @@ href="#frequency-value"><code><frequency></code></a>, <a href="#angle-value"><code><angle></code></a>, <a href="#time-value"><code><time></code></a>, or <a - href="#number-value"><code><number></code></a> values are allowed. - - <p class=issue>What definition of "mod" do we use? Should ‘<code - class=css>calc(-3mod5)</code>’ return ‘<code - class=css>-3</code>’ or ‘<code class=css>2</code>’?</p> + href="#number-value"><code><number></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 ‘<code class=css>+</code>’ and ‘<code class=css>-</code>’ operators. The ‘<code - class=css>*</code>’, ‘<code class=css>/</code>’, and - ‘<code class=css>mod</code>’ operators do not require spaces. + class=css>*</code>’ and ‘<code class=css>/</code>’ + 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 ‘<code class=css><number></code>’; resolve to the type of the other side - <li>At ‘<code class=css>/</code>’ or ‘<code - class=css>mod</code>’, check that the right side is ‘<code - class=css><number></code>’; resolve to the type of the left - side. + <li>At ‘<code class=css>/</code>’, check that the right side + is ‘<code class=css><number></code>’; 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><number></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 ''<number>''; resolve to the type of the other side</li> - <li>At ''/'' or ''mod'', check that the right side is ''<number>''; + <li>At ''/'', check that the right side is ''<number>''; resolve to the type of the left side.</li> </ul>
Received on Tuesday, 11 October 2011 01:45:32 UTC