1.1 --- a/css3-conditional/Overview.html Thu Feb 07 16:17:08 2013 -0800 1.2 +++ b/css3-conditional/Overview.html Thu Feb 07 17:53:44 2013 -0800 1.3 @@ -573,15 +573,41 @@ 1.4 adding: 1.5 1.6 <pre> 1.7 -@{S}{U}{P}{P}{O}{R}{T}{S} {return SUPPORTS_SYM;} 1.8 -{O}{R} {return OR;} 1.9 +@{S}{U}{P}{P}{O}{R}{T}{S} {return <dfn 1.10 + id="supports_sym">SUPPORTS_SYM</dfn>;} 1.11 +{O}{R} {return <dfn 1.12 + id=or>OR</dfn>;} 1.13 </pre> 1.14 1.15 - <p>and the grammar by adding 1.16 + <p>This then extends the grammar in the <a 1.17 + href="http://www.w3.org/TR/CSS21/grammar.html">Grammar of CSS 2.1</a>, 1.18 + using the lexical scanner there, with the additions of <code><a 1.19 + href="http://www.w3.org/TR/css3-mediaqueries/#syntax">AND</a></code> and 1.20 + <code><a 1.21 + href="http://www.w3.org/TR/css3-mediaqueries/#syntax">NOT</a></code> 1.22 + tokens defined in the Media Queries specification <a href="#MEDIAQ" 1.23 + rel=biblioentry>[MEDIAQ]<!--{{!MEDIAQ}}--></a> and the <a 1.24 + href="#or"><code>OR</code></a> and <a 1.25 + href="#supports_sym"><code>SUPPORTS_SYM</code></a> tokens defined above, 1.26 + and with <code><a 1.27 + href="http://www.w3.org/TR/CSS21/syndata.html#tokenization">declaration</a></code>, 1.28 + <code><a 1.29 + href="http://www.w3.org/TR/CSS21/syndata.html#tokenization">any</a></code>, 1.30 + and <code><a 1.31 + href="http://www.w3.org/TR/CSS21/syndata.html#tokenization">unused</a></code> 1.32 + productions and the <code><a 1.33 + href="http://www.w3.org/TR/CSS21/syndata.html#tokenization">FUNCTION</a></code> 1.34 + token taken from the core syntax of CSS defined in <a 1.35 + href="http://www.w3.org/TR/CSS21/syndata.html#tokenization">section 4.1.1 1.36 + (Tokenization)</a> of <a href="#CSS21" 1.37 + rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>, by adding: 1.38 1.39 <pre><dfn id="supports_rule">supports_rule</dfn> 1.40 - : SUPPORTS_SYM S* <a 1.41 - href="#supports_condition"><i>supports_condition</i></a> S* <a 1.42 + : <a 1.43 + href="#supports_sym"><i>SUPPORTS_SYM</i></a> <a 1.44 + href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a 1.45 + href="#supports_condition"><i>supports_condition</i></a> <a 1.46 + href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a 1.47 href="#group_rule_body"><i>group_rule_body</i></a> 1.48 ; 1.49 1.50 @@ -597,8 +623,10 @@ 1.51 1.52 <dfn 1.53 id="supports_condition_in_parens">supports_condition_in_parens</dfn> 1.54 - : ( '(' S* <a 1.55 - href="#supports_condition"><i>supports_condition</i></a> S* ')' ) | <a 1.56 + : ( '(' <a 1.57 + href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a 1.58 + href="#supports_condition"><i>supports_condition</i></a> <a 1.59 + href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* ')' ) | <a 1.60 href="#supports_declaration_condition"><i>supports_declaration_condition</i></a> | 1.61 <a 1.62 href="#general_enclosed"><i>general_enclosed</i></a> 1.63 @@ -606,43 +634,48 @@ 1.64 1.65 <dfn 1.66 id="supports_negation">supports_negation</dfn> 1.67 - : NOT S+ <a 1.68 + : <a 1.69 + href="http://www.w3.org/TR/css3-mediaqueries/#syntax"><i>NOT</i></a> <a 1.70 + href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>+ <a 1.71 href="#supports_condition_in_parens"><i>supports_condition_in_parens</i></a> 1.72 ; 1.73 1.74 <dfn 1.75 id="supports_conjunction">supports_conjunction</dfn> 1.76 : <a 1.77 - href="#supports_condition_in_parens"><i>supports_condition_in_parens</i></a> ( S+ AND S+ <a 1.78 + href="#supports_condition_in_parens"><i>supports_condition_in_parens</i></a> ( <a 1.79 + href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>+ <a 1.80 + href="http://www.w3.org/TR/css3-mediaqueries/#syntax"><i>AND</i></a> <a 1.81 + href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>+ <a 1.82 href="#supports_condition_in_parens"><i>supports_condition_in_parens</i></a> )+ 1.83 ; 1.84 1.85 <dfn 1.86 id="supports_disjunction">supports_disjunction</dfn> 1.87 : <a 1.88 - href="#supports_condition_in_parens"><i>supports_condition_in_parens</i></a> ( S+ OR S+ <a 1.89 + href="#supports_condition_in_parens"><i>supports_condition_in_parens</i></a> ( <a 1.90 + href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>+ <a 1.91 + href="#or"><i>OR</i></a> <a 1.92 + href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>+ <a 1.93 href="#supports_condition_in_parens"><i>supports_condition_in_parens</i></a> )+ 1.94 ; 1.95 1.96 <dfn 1.97 id="supports_declaration_condition">supports_declaration_condition</dfn> 1.98 - : '(' S* declaration ')' 1.99 + : '(' <a 1.100 + href="http://www.w3.org/TR/CSS21/grammar.html#scanner"><i>S</i></a>* <a 1.101 + href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>declaration</i></a> ')' 1.102 ; 1.103 1.104 <dfn 1.105 id="general_enclosed">general_enclosed</dfn> 1.106 - : ( FUNCTION | '(' ) ( any | unused )* ')' 1.107 + : ( <a 1.108 + href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>FUNCTION</i></a> | '(' ) ( <a 1.109 + href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>any</i></a> | <a 1.110 + href="http://www.w3.org/TR/CSS21/syndata.html#tokenization"><i>unused</i></a> )* ')' 1.111 ; 1.112 </pre> 1.113 1.114 - <p>in which <code>declaration</code>, <code>any</code>, and 1.115 - <code>unused</code> are the productions in the core syntax of CSS defined 1.116 - in <a href="http://www.w3.org/TR/CSS21/syndata.html#tokenization">section 1.117 - 4.1.1 (Tokenization)</a> of <a href="#CSS21" 1.118 - rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>, and the <code>AND</code> and 1.119 - <code>NOT</code> tokens are defined in the Media Queries specification <a 1.120 - href="#MEDIAQ" rel=biblioentry>[MEDIAQ]<!--{{!MEDIAQ}}--></a>. 1.121 - 1.122 <p> Implementations <strong>must</strong> parse ‘<code 1.123 class=css>@supports</code>’ rules based on the above grammar, and when 1.124 interpreting the above grammar, <strong>must</strong> match the production 1.125 @@ -654,9 +687,11 @@ 1.126 allows for substantial future extensibility. Any ‘<code 1.127 class=css>@supports</code>’ rule that does not parse according to the 1.128 grammar above (that is, a rule that does not match this loose grammar 1.129 - which includes the general_enclosed production) is invalid. Style sheets 1.130 - <strong>must not</strong> use such a rule and processors 1.131 - <strong>must</strong> ignore such a rule (including all of its contents). 1.132 + which includes the <a 1.133 + href="#general_enclosed"><code>general_enclosed</code></a> production) is 1.134 + invalid. Style sheets <strong>must not</strong> use such a rule and 1.135 + processors <strong>must</strong> ignore such a rule (including all of its 1.136 + contents). 1.137 1.138 <p>Each of these grammar terms is associated with a boolean result, as 1.139 follows: 1.140 @@ -768,14 +803,15 @@ 1.141 }</pre> 1.142 </div> 1.143 1.144 - <p>To avoid confusion between ‘<code class=css>and</code>’ and ‘<code 1.145 - class=css>or</code>’, the syntax requires that both ‘<code 1.146 - class=css>and</code>’ and ‘<code class=css>or</code>’ be specified 1.147 - explicitly (rather than, say, using commas or spaces for one of them). 1.148 - Likewise, to avoid confusion caused by precedence rules, the syntax does 1.149 - not allow ‘<code class=css>and</code>’, ‘<code 1.150 - class=css>or</code>’, and ‘<code class=css>not</code>’ operators to 1.151 - be mixed without a layer of parentheses. 1.152 + <p>To avoid confusion between ‘<code class=css>and</code>’ and ‘<a 1.153 + href="#or"><code class=css>or</code></a>’, the syntax requires that both 1.154 + ‘<code class=css>and</code>’ and ‘<a href="#or"><code 1.155 + class=css>or</code></a>’ be specified explicitly (rather than, say, 1.156 + using commas or spaces for one of them). Likewise, to avoid confusion 1.157 + caused by precedence rules, the syntax does not allow ‘<code 1.158 + class=css>and</code>’, ‘<a href="#or"><code 1.159 + class=css>or</code></a>’, and ‘<code class=css>not</code>’ operators 1.160 + to be mixed without a layer of parentheses. 1.161 1.162 <div class=example> 1.163 <p>For example, the following rule is not valid: 1.164 @@ -803,7 +839,8 @@ 1.165 1.166 <p>Furthermore, whitespace is required after a ‘<code 1.167 class=css>not</code>’ and on both sides of an ‘<code 1.168 - class=css>and</code>’ or ‘<code class=css>or</code>’. 1.169 + class=css>and</code>’ or ‘<a href="#or"><code 1.170 + class=css>or</code></a>’. 1.171 1.172 <p>The declaration being tested must always occur within parentheses, when 1.173 it is the only thing in the expression. 1.174 @@ -1652,6 +1689,8 @@ 1.175 <li>nested_statement, <a href="#nested_statement" 1.176 title="section 3."><strong>3.</strong></a> 1.177 1.178 + <li>OR, <a href="#or" title="section 6."><strong>6.</strong></a> 1.179 + 1.180 <li>support, <a href="#dfn-support" 1.181 title="section 6.1."><strong>6.1.</strong></a> 1.182 1.183 @@ -1679,6 +1718,9 @@ 1.184 1.185 <li>supports_rule, <a href="#supports_rule" 1.186 title="section 6."><strong>6.</strong></a> 1.187 + 1.188 + <li>SUPPORTS_SYM, <a href="#supports_sym" 1.189 + title="section 6."><strong>6.</strong></a> 1.190 </ul> 1.191 <!--end-index--> 1.192 </html>