Skip to content

Commit e1098c2

Browse files
committed
[css-conditional] use standard whitespace convention for grammar terms again
This reverts the remainder of https://hg.csswg.org/drafts/rev/34b185ae3bac which was partially reverted in https://hg.csswg.org/drafts/rev/3091bbbdc67a This revert restores this grammar to follow the standard convention that all terms consume the whitespace at their end. When there was mandatory whitespace around 'and', 'or', and 'not' in supports conditions, we couldn't follow that convention because the mandatory whitespace might be consumed as part of a term in which the whitespace was optional. But now that there is no more mandatory whitespace, we should follow the usual convention. I made the edits manually, and then checked that it matched the state of the grammar before the initial change (which it does).
1 parent 52b802a commit e1098c2

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

css-conditional/Overview.bs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ by adding:</p>
312312

313313
<pre>
314314
<dfn>supports_rule</dfn>
315-
: <a>SUPPORTS_SYM</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>group_rule_body</a>
315+
: <a>SUPPORTS_SYM</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition</a> <a>group_rule_body</a>
316316
;
317317

318318
<dfn>supports_condition</dfn>
@@ -321,7 +321,7 @@ by adding:</p>
321321
;
322322

323323
<dfn>supports_condition_in_parens</dfn>
324-
: ( '(' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* ')' ) | <a>supports_declaration_condition</a> |
324+
: ( '(' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition</a> ')' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* ) | <a>supports_declaration_condition</a> |
325325
<a>general_enclosed</a>
326326
;
327327

@@ -330,19 +330,19 @@ by adding:</p>
330330
;
331331

332332
<dfn>supports_conjunction</dfn>
333-
: <a>supports_condition_in_parens</a> ( <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a href="https://www.w3.org/TR/css3-mediaqueries/#syntax">AND</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition_in_parens</a> )+
333+
: <a>supports_condition_in_parens</a> ( <a href="https://www.w3.org/TR/css3-mediaqueries/#syntax">AND</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition_in_parens</a> )+
334334
;
335335

336336
<dfn>supports_disjunction</dfn>
337-
: <a>supports_condition_in_parens</a> ( <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>OR</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition_in_parens</a> )+
337+
: <a>supports_condition_in_parens</a> ( <a>OR</a> <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a>supports_condition_in_parens</a> )+
338338
;
339339

340340
<dfn>supports_declaration_condition</dfn>
341-
: '(' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">declaration</a> ')'
341+
: '(' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>* <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">declaration</a> ')' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>*
342342
;
343343

344344
<dfn>general_enclosed</dfn>
345-
: ( <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">FUNCTION</a> | '(' ) ( <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">any</a> | <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">unused</a> )* ')'
345+
: ( <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">FUNCTION</a> | '(' ) ( <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">any</a> | <a href="https://www.w3.org/TR/CSS21/syndata.html#tokenization">unused</a> )* ')' <a href="https://www.w3.org/TR/CSS21/grammar.html#scanner">S</a>*
346346
;
347347
</pre>
348348

0 commit comments

Comments
 (0)