Skip to content

Commit e8f7af3

Browse files
committed
[css-mediaqueries] Require spaces before and after the 'and' keyword, as well as after 'not' and 'only'
1 parent 1cb3035 commit e8f7af3

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

mediaqueries/Overview.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<meta content="Media Queries Level 4" name=dcterms.title>
1313
<meta content=text name=dcterms.type>
14-
<meta content=2013-06-14 name=dcterms.date>
14+
<meta content=2013-07-10 name=dcterms.date>
1515
<meta content="Florian Rivoal" name=dcterms.creator>
1616
<meta content=W3C name=dcterms.publisher>
1717
<meta content="http://dev.w3.org/csswg/mediaqueries4/"
@@ -55,11 +55,11 @@
5555

5656
<h1 id=media-queries>Media Queries Level 4</h1>
5757

58-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 14 June 2013</h2>
58+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 10 July 2013</h2>
5959

6060
<dl>
6161
<dt>This version:
62-
<!-- <dd><a href="http://dev.w3.org/csswg/mediaqueries4/">http://www.w3.org/TR/2013/ED-mediaqueries4-20130614/</a> -->
62+
<!-- <dd><a href="http://dev.w3.org/csswg/mediaqueries4/">http://www.w3.org/TR/2013/ED-mediaqueries4-20130710/</a> -->
6363

6464
<dd><a
6565
href="http://dev.w3.org/csswg/mediaqueries4/">http://dev.w3.org/csswg/mediaqueries4/</a>
@@ -597,14 +597,14 @@ <h2 id=syntax><span class=secno>3. </span>Syntax</h2>
597597
: S* [media_query [ ',' S* media_query ]* ]?
598598
;
599599
media_query
600-
: [ONLY | NOT]? S* media_type S* [ AND S* expression ]*
601-
| expression [ AND S* expression ]*
600+
: [ONLY | NOT]? S+ media_type [ S+ AND S+ expression ]* S*
601+
| expression [ S+ AND S+ expression ]* S*
602602
;
603603
media_type
604604
: IDENT
605605
;
606606
expression
607-
: '(' S* media_feature S* [ ':' S* expr ]? ')' S*
607+
: '(' S* media_feature S* [ ':' S* expr ]? ')'
608608
;
609609
media_feature
610610
: IDENT
@@ -1412,6 +1412,9 @@ <h3 id=changes-2012><span class=secno>5.1. </span>Changes Since the Media
14121412
<li><code class=css>or</code>’, ‘<code class=css>and</code>’,
14131413
<code class=css>only</code>’ and ‘<code class=css>not</code>
14141414
are invalid media types.
1415+
1416+
<li>White space is required around the keyword “and” as well as after
1417+
"not" and "only".
14151418
</ul>
14161419

14171420
<h2 id=conformance><span class=secno>6. </span> Conformance</h2>

mediaqueries/Overview.src.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,14 +387,14 @@ <h2>Syntax</h2>
387387
: S* [media_query [ ',' S* media_query ]* ]?
388388
;
389389
media_query
390-
: [ONLY | NOT]? S* media_type S* [ AND S* expression ]*
391-
| expression [ AND S* expression ]*
390+
: [ONLY | NOT]? S+ media_type [ S+ AND S+ expression ]* S*
391+
| expression [ S+ AND S+ expression ]* S*
392392
;
393393
media_type
394394
: IDENT
395395
;
396396
expression
397-
: '(' S* media_feature S* [ ':' S* expr ]? ')' S*
397+
: '(' S* media_feature S* [ ':' S* expr ]? ')'
398398
;
399399
media_feature
400400
: IDENT
@@ -1171,6 +1171,7 @@ <h3 id="changes-2012">Changes Since the Media Queries Level 3</h3>
11711171
<li>The <a href="#hover">''hover'' media feature</a> was added.
11721172
<li>The <a href="#luminosity">''luminosity'' media feature</a> was added.
11731173
<li>''or'', ''and'', ''only'' and ''not'' are invalid media types.
1174+
<li>White space is required around the keyword “and” as well as after "not" and "only".
11741175
</ul>
11751176

11761177
<h2 id="conformance">

0 commit comments

Comments
 (0)