Skip to content

Commit f6ca149

Browse files
committed
clarify that zero can be followed by a unit identifier in a better way (credit: dbaron)
1 parent 953eeb9 commit f6ca149

2 files changed

Lines changed: 17 additions & 16 deletions

File tree

css3-mediaqueries/Overview.html

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424

2525
<h1 id=media-queries>Media Queries</h1>
2626

27-
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft 1 September 2008</h2>
27+
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft 8 September 2008</h2>
2828

2929
<dl>
3030
<dt>This version:
3131

3232
<dd><a
33-
href="http://www.w3.org/TR/2008/ED-css3-mediaqueries-20080901/">http://www.w3.org/TR/2008/ED-css3-mediaqueries-20080901/</a>
33+
href="http://www.w3.org/TR/2008/ED-css3-mediaqueries-20080908/">http://www.w3.org/TR/2008/ED-css3-mediaqueries-20080908/</a>
3434

3535
<dt>Latest version:
3636

@@ -569,7 +569,7 @@ <h2 id=syntax><span class=secno>3. </span>Syntax</h2>
569569
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
570570

571571
<pre>media_query_list
572-
: S* media_query [ &#39;,&#39; S* media_query]* | S*
572+
: S* media_query [ ',' S* media_query]* | S*
573573
;
574574
media_query
575575
: [ONLY | NOT]? S* media_type S* [ AND S* expression ]*
@@ -579,7 +579,7 @@ <h2 id=syntax><span class=secno>3. </span>Syntax</h2>
579579
: IDENT
580580
;
581581
expression
582-
: &#39;(&#39; S* media_feature S* [&#39;:&#39; S* value]? &#39;)&#39; S*
582+
: '(' S* media_feature S* [':' S* value]? ')' S*
583583
;
584584
media_feature
585585
: IDENT
@@ -746,11 +746,12 @@ <h2 id=media1><span class=secno>4. </span>Media features</h2>
746746
features, on the other hand, can also be used without a value. For a
747747
media feature <var>feature</var>, <code>(<var>feature</var>)</code> will
748748
evaluate to true if <code>(<var>feature</var>:<var>x</var>)</code> will
749-
evaluate to true for a value <var>x</var> other than zero, including e.g.
750-
<code>0</code>, <code>0px</code>, and <code>0em</code>. Media features
751-
that are prefixed by min/max cannot be used without a value. When a media
752-
feature prefixed with min/max is used without a value it makes the media
753-
query malformed.
749+
evaluate to true for a value <var>x</var> other than zero or zero
750+
followed by a unit identifier (i.e., other than <code>0</code>,
751+
<code>0px</code>, <code>0em</code>, etc.). Media features that are
752+
prefixed by min/max cannot be used without a value. When a media feature
753+
prefixed with min/max is used without a value it makes the media query
754+
malformed.
754755

755756
<li>Properties may accept more complex values, e.g., calculations that
756757
involve several other values. Media features only accept single values:

css3-mediaqueries/Overview.src.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ <h2>Syntax</h2>
432432
<code>medium</code> production from CSS2. [[!CSS21]]</p>
433433

434434
<pre>media_query_list
435-
: S* media_query [ &#39;,&#39; S* media_query]* | S*
435+
: S* media_query [ ',' S* media_query]* | S*
436436
;
437437
media_query
438438
: [ONLY | NOT]? S* media_type S* [ AND S* expression ]*
@@ -442,7 +442,7 @@ <h2>Syntax</h2>
442442
: IDENT
443443
;
444444
expression
445-
: &#39;(&#39; S* media_feature S* [&#39;:&#39; S* value]? &#39;)&#39; S*
445+
: '(' S* media_feature S* [':' S* value]? ')' S*
446446
;
447447
media_feature
448448
: IDENT
@@ -603,11 +603,11 @@ <h2 id="media1">Media features</h2>
603603
features, on the other hand, can also be used without a value. For a media
604604
feature <var>feature</var>, <code>(<var>feature</var>)</code> will evaluate
605605
to true if <code>(<var>feature</var>:<var>x</var>)</code> will evaluate to
606-
true for a value <var>x</var> other than zero, including e.g.
607-
<code>0</code>, <code>0px</code>, and <code>0em</code>. Media features that
608-
are prefixed by min/max cannot be used without a value. When a media feature
609-
prefixed with min/max is used without a value it makes the media query
610-
malformed.</li>
606+
true for a value <var>x</var> other than zero or zero followed by a unit
607+
identifier (i.e., other than <code>0</code>, <code>0px</code>,
608+
<code>0em</code>, etc.). Media features that are prefixed by min/max cannot
609+
be used without a value. When a media feature prefixed with min/max is used
610+
without a value it makes the media query malformed.</li>
611611

612612
<li>Properties may accept more complex values, e.g., calculations that
613613
involve several other values. Media features only accept single

0 commit comments

Comments
 (0)