- From: David Baron via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 25 Nov 2011 00:17:56 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/css3-conditional
In directory hutz:/tmp/cvs-serv20506
Modified Files:
Overview.src.html Overview.html
Log Message:
Specify the results of the discussion on parenthesis nesting: extra parentheses should be allowed.
Index: Overview.html
===================================================================
RCS file: /sources/public/csswg/css3-conditional/Overview.html,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- Overview.html 24 Nov 2011 17:38:56 -0000 1.43
+++ Overview.html 25 Nov 2011 00:17:53 -0000 1.44
@@ -17,14 +17,14 @@
<h1>CSS Conditional Rules Module Level 3</h1>
- <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 24 November
+ <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 25 November
2011</h2>
<dl>
<dt>This version:
- <dd><a href="http://www.w3.org/TR/2011/ED-css3-conditional-20111124/">
- http://www.w3.org/TR/2011/ED-css3-conditional-20111124/</a>
+ <dd><a href="http://www.w3.org/TR/2011/ED-css3-conditional-20111125/">
+ http://www.w3.org/TR/2011/ED-css3-conditional-20111125/</a>
<dt>Latest version:
@@ -564,7 +564,11 @@
supports_condition
: supports_negation | supports_conjunction | supports_disjunction |
- supports_declaration_condition
+ supports_condition_in_parens
+ ;
+
+supports_condition_in_parens
+ : ( '(' supports_condition ')' S* ) | supports_declaration_condition
;
supports_negation
@@ -579,10 +583,6 @@
: supports_condition_in_parens ( 'or' S* supports_condition_in_parens )+
;
-supports_condition_in_parens
- : ( '(' supports_condition ')' S* ) | supports_declaration_condition
- ;
-
supports_declaration_condition
: '(' S* core_declaration ')' S*
;</pre>
@@ -598,16 +598,6 @@
not</strong> use such a rule and processors <strong>must</strong> ignore
such a rule.
- <p class=issue>The grammar above attempted to prevent nesting of extra
- parentheses; however, discussion in the working group has led to the
- conclusion that this was a bad idea, and therefore it should be changed to
- allow arbitrary nesting of extra parentheses (which, for example, makes it
- easier to comment things out). There was also discussion of allowing the
- toplevel parentheses around a declaration to be omitted, though opinion
- tended towards thinking this was a bad idea. See <a
- href="http://lists.w3.org/Archives/Public/www-style/2011Aug/thread.html#msg247">thread</a>
- on www-style.
-
<p class=note>Note that this means that declarations that meet the
forward-compatible syntax for declarations are permitted (and support for
them is then tested by the ‘<code class=css>@supports</code>’
@@ -629,6 +619,12 @@
<dd> The result is the result of the single child term.
+ <dt>supports_condition_in_parens
+
+ <dd> The result is the result of the single
+ <code>supports_condition</code> or
+ <code>supports_declaration_condition</code> child term.
+
<dt>supports_negation
<dd> The result is the <em>negation</em> of the result of the
@@ -646,12 +642,6 @@
<code>supports_condition_in_parens</code> child terms is true; otherwise
it is false.
- <dt>supports_condition_in_parens
-
- <dd> The result is the result of the single
- <code>supports_condition</code> or
- <code>supports_declaration_condition</code> child term.
-
<dt>supports_declaration_condition
<dd> The result is whether the CSS processor <a
@@ -751,6 +741,37 @@
}</pre>
</div>
+ <p>The declaration being tested must always occur within parentheses, when
+ it is the only thing in the expression.
+
+ <p>
+
+ <div class=example>
+ <p>For example, the following rule is not valid:
+
+ <pre class=illegal-example>@supports display: flexbox {
+ // ...
+}</pre>
+
+ <p>Instead, authors must write:</p>
+
+ <pre>@supports (display: flexbox) {
+ // ...
+}</pre>
+ </div>
+
+ <p>The syntax allows extra parentheses when they are not needed. This
+ flexibility is sometimes useful for authors (for example, when commenting
+ out parts of an expression) and may also be useful for authoring tools.
+
+ <div class=example>
+ <p>For example, authors may write:</p>
+
+ <pre>@supports ((display: flexbox)) {
+ // ...
+}</pre>
+ </div>
+
<h3 id=support-definition><span class=secno>6.1. </span>Definition of
support</h3>
Index: Overview.src.html
===================================================================
RCS file: /sources/public/csswg/css3-conditional/Overview.src.html,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- Overview.src.html 24 Nov 2011 17:38:56 -0000 1.43
+++ Overview.src.html 25 Nov 2011 00:17:53 -0000 1.44
@@ -377,7 +377,11 @@
supports_condition
: supports_negation | supports_conjunction | supports_disjunction |
- supports_declaration_condition
+ supports_condition_in_parens
+ ;
+
+supports_condition_in_parens
+ : ( '(' supports_condition ')' S* ) | supports_declaration_condition
;
supports_negation
@@ -392,10 +396,6 @@
: supports_condition_in_parens ( 'or' S* supports_condition_in_parens )+
;
-supports_condition_in_parens
- : ( '(' supports_condition ')' S* ) | supports_declaration_condition
- ;
-
supports_declaration_condition
: '(' S* core_declaration ')' S*
;</pre>
@@ -408,16 +408,6 @@
above is invalid. Style sheets <strong>must not</strong> use such a
rule and processors <strong>must</strong> ignore such a rule.</p>
-<p class="issue">The grammar above attempted to prevent nesting of extra
-parentheses; however, discussion in the working group has led to the
-conclusion that this was a bad idea, and therefore it should be changed
-to allow arbitrary nesting of extra parentheses (which, for example,
-makes it easier to comment things out). There was also discussion of
-allowing the toplevel parentheses around a declaration to be omitted,
-though opinion tended towards thinking this was a bad idea. See
-<a href="http://lists.w3.org/Archives/Public/www-style/2011Aug/thread.html#msg247">thread</a>
-on www-style.</p>
-
<p class="note">Note that this means that declarations that meet the
forward-compatible syntax for declarations are permitted (and support
for them is then tested by the ''@supports'' rule), but declarations
@@ -438,6 +428,12 @@
The result is the result of the single child term.
</dd>
+<dt>supports_condition_in_parens</dt>
+<dd>
+ The result is the result of the single <code>supports_condition</code>
+ or <code>supports_declaration_condition</code> child term.
+</dd>
+
<dt>supports_negation</dt>
<dd>
The result is the <em>negation</em> of the result of the
@@ -458,12 +454,6 @@
otherwise it is false.
</dd>
-<dt>supports_condition_in_parens</dt>
-<dd>
- The result is the result of the single <code>supports_condition</code>
- or <code>supports_declaration_condition</code> child term.
-</dd>
-
<dt>supports_declaration_condition</dt>
<dd>
The result is whether the CSS processor <a
@@ -545,6 +535,32 @@
}</pre>
</div>
+<p>The declaration being tested must always occur within parentheses,
+when it is the only thing in the expression.<p>
+
+<div class="example">
+<p>For example, the following rule is not valid:
+<pre class="illegal-example">@supports display: flexbox {
+ // ...
+}</pre>
+<p>Instead, authors must write:</p>
+<pre>@supports (display: flexbox) {
+ // ...
+}</pre>
+</div>
+
+<p>The syntax allows extra parentheses when they are not needed. This
+flexibility is sometimes useful for authors (for example, when
+commenting out parts of an expression) and may also be useful for
+authoring tools.</p>
+
+<div class="example">
+<p>For example, authors may write:</p>
+<pre>@supports ((display: flexbox)) {
+ // ...
+}</pre>
+</div>
+
<h3 id="support-definition">Definition of support</h3>
<p>A CSS processor is considered to <dfn id="dfn-support">support</dfn>
Received on Friday, 25 November 2011 00:18:00 UTC