8000 work around bugs in the preprocessor; make grid:2 an error; add notes… · w3c/csswg-drafts@ebae17e · GitHub
Skip to content

Commit ebae17e

Browse files
committed
work around bugs in the preprocessor; make grid:2 an error; add notes about not affecting HTML and all; <resolution> takes numbers
1 parent 6e981a8 commit ebae17e

2 files changed

Lines changed: 41 additions & 24 deletions

File tree

css3-mediaqueries/Overview.html

Lines changed: 25 additions & 15 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 12 June 2008</h2>
27+
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft 26 August 2008</h2>
2828

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

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

3535
<dt>Latest version:
3636

@@ -400,6 +400,9 @@ <h2 id=media0><span class=secno>2. </span>Media Queries</h2>
400400
(<code>example.css</code>) applies to devices of a certain media type
401401
(&lsquo;<code class=css>screen</code>&rsquo;) with certain feature (it
402402
must be a color screen).</p>
403+
404+
<p class=note>HTML has not yet been normatively updated to use media
405+
queries in the <code>media</code> attribute.</p>
403406
</div>
404407

405408
<div class=example>
@@ -494,6 +497,11 @@ <h2 id=media0><span class=secno>2. </span>Media Queries</h2>
494497

495498
<span class=css-example>@media screen and (color), projection and (color) { ... }</span>
496499
</pre>
500+
501+
<p class=note>Just like HTML, the <a href="#XMLSTYLE"
502+
rel=biblioentry>[XMLSTYLE]<!--{{XMLSTYLE}}--></a> specification has not
503+
yet been updated to use media queries in the <code>media</code>
504+
pseudo-attribute.</p>
497505
</div>
498506

499507
<p>If a media feature does not apply to the device where the UA is running,
@@ -563,7 +571,7 @@ <h2 id=syntax><span class=secno>3. </span>Syntax</h2>
563571
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
564572

565573
<pre>media_query_list
566-
: S* media_query [ ',' S* media_query]* | S*
574+
: S* media_query [ &#39;,&#39; S* media_query]* | S*
567575
;
568576
media_query
569577
: [ONLY | NOT]? S* media_type S* [ AND S* expression ]*
@@ -573,7 +581,7 @@ <h2 id=syntax><span class=secno>3. </span>Syntax</h2>
573581
: IDENT
574582
;
575583
expression
576-
: '(' S* media_feature S* [':' S* value]? ')' S*
584+
: &#39;(&#39; S* media_feature S* [&#39;:&#39; S* value]? &#39;)&#39; S*
577585
;
578586
media_feature
579587
: IDENT
@@ -687,8 +695,8 @@ <h3 id=error><span class=secno>3.1 </span>Error Handling</h3>
687695
unexpected tokens encountered while parsing a media query by reading
688696
until the end of the media query, while observing <a
689697
href="http://www.w3.org/TR/CSS21/syndata.html#block">the rules for
690-
matching pairs</a> of (), [], {}, "", and '', and correctly handling
691-
escapes. Media queries with unexpected tokens are ignored. <a
698+
matching pairs</a> of (), [], {}, "", and &#39;&#39;, and correctly
699+
handling escapes. Media queries with unexpected tokens are ignored. <a
692700
href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a></p>
693701

694702
<div class=example>
@@ -1164,6 +1172,9 @@ <h3 id=grid><span class=secno>4.13 </span>grid</h3>
11641172
grid-based (e.g., a "tty" terminal, or a phone display with only one fixed
11651173
font), the value will be 1. Otherwise, the value will be 0.
11661174

1175+
<p>Only 0 and 1 are valid values. (This includes -0.) Thus everything else
1176+
creates a malformed media query.
1177+
11671178
<p>The &lsquo;<code class=css>em</code>&rsquo; unit has a special meaning
11681179
in grid output devices. Since the exact with of an &lsquo;<code
11691180
class=css>em</code>&rsquo; cannot be determined, one &lsquo;<code
@@ -1186,16 +1197,15 @@ <h2 id=values><span class=secno>5. </span>Values</h2>
11861197
<p>The &lt;ratio> value is a positive (not zero or negative) &lt;integer>
11871198
followed by optional whitespace, followed by a solidus (&lsquo;<code
11881199
class=css>/</code>&rsquo;), followed by optional whitespace, followed by a
1189-
positive &lt;integer>. Whitespace and &lt;integer> are defined by CSS 2.1.
1190-
<a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
1200+
positive &lt;integer>.
11911201

1192-
<p>The &lt;resolution> value is a positive &lt;integer> immediately
1193-
followed by a unit identifier (&lsquo;<code class=css>dpi</code>&rsquo; or
1202+
<p>The &lt;resolution> value is a positive &lt;number> immediately followed
1203+
by a unit identifier (&lsquo;<code class=css>dpi</code>&rsquo; or
11941204
&lsquo;<code class=css>dpcm</code>&rsquo;).
11951205

1196-
<p>Other values used by this specification are the same as in other parts
1197-
of CSS, normatively defined by CSS 2.1. <a href="#CSS21"
1198-
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
1206+
<p>Whitespace, &lt;integer>, &lt;number> and other values used by this
1207+
specification are the same as in other parts of CSS, normatively defined
1208+
by CSS 2.1. <a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
11991209

12001210
<h2 id=units><span class=secno>6. </span>Units</h2>
12011211

@@ -1207,8 +1217,8 @@ <h2 id=units><span class=secno>6. </span>Units</h2>
12071217

12081218
<p>Relative units in media queries are based on the initial value. For
12091219
example, in HTML, the &lsquo;<code class=css>em</code>&rsquo; unit is
1210-
relative to the initial value of &lsquo;<span
1211-
class=property>font-size</span>&rsquo;.
1220+
relative to the initial value of &lsquo;<code
1221+
class=property>font-size</code>&rsquo;.
12121222

12131223
<h3 id=resolution0><span class=secno>6.1 </span>Resolution</h3>
12141224

css3-mediaqueries/Overview.src.html

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ <h2 id="media0">Media Queries</h2>
268268
<p>This example expresses that a certain style sheet
269269
(<code>example.css</code>) applies to devices of a certain media type
270270
(''screen'') with certain feature (it must be a color screen).</p>
271+
272+
<p class="note">HTML has not yet been normatively updated to use media queries in the <code>media</code> attribute.</p>
271273
</div>
272274

273275
<div class="example">
@@ -360,6 +362,9 @@ <h2 id="media0">Media Queries</h2>
360362
<span class="css-example">@media screen and (color), projection and (color) { ... }</span>
361363
</pre>
362364

365+
<p class="note">Just like HTML, the [[XMLSTYLE]] specification has not yet
366+
been updated to use media queries in the <code>media</code> pseudo-attribute.</p>
367+
363368
</div>
364369

365370
<p>If a media feature does not apply to the device where the UA is
@@ -424,7 +429,7 @@ <h2>Syntax</h2>
424429
<code>medium</code> production from CSS2. [[!CSS21]]</p>
425430

426431
<pre>media_query_list
427-
: S* media_query [ ',' S* media_query]* | S*
432+
: S* media_query [ &#39;,&#39; S* media_query]* | S*
428433
;
429434
media_query
430435
: [ONLY | NOT]? S* media_type S* [ AND S* expression ]*
@@ -434,7 +439,7 @@ <h2>Syntax</h2>
434439
: IDENT
435440
;
436441
expression
437-
: '(' S* media_feature S* [':' S* value]? ')' S*
442+
: &#39;(&#39; S* media_feature S* [&#39;:&#39; S* value]? &#39;)&#39; S*
438443
;
439444
media_feature
440445
: IDENT
@@ -544,7 +549,7 @@ <h3>Error Handling</h3>
544549
unexpected tokens encountered while parsing a media query by reading until
545550
the end of the media query, while observing
546551
<a href="http://www.w3.org/TR/CSS21/syndata.html#block">the rules for
547-
matching pairs</a> of (), [], {}, "", and '', and correctly handling
552+
matching pairs</a> of (), [], {}, "", and &#39;&#39;, and correctly handling
548553
escapes. Media queries with unexpected tokens are ignored. [[!CSS21]]
549554

550555
<div class="example">
@@ -1051,6 +1056,9 @@ <h3 id="grid">grid</h3>
10511056
terminal, or a phone display with only one fixed font), the value will
10521057
be 1. Otherwise, the value will be 0.</p>
10531058

1059+
<p>Only 0 and 1 are valid values. (This includes -0.) Thus everything else
1060+
creates a malformed media query.</p>
1061+
10541062
<p>The ''em'' unit has a special meaning in grid output devices. Since
10551063
the exact with of an ''em'' cannot be determined, one ''em'' is assumed to
10561064
be the width of one grid cell horizontally and the height of one grid
@@ -1074,15 +1082,14 @@ <h2 id="values">Values</h2>
10741082

10751083
<p>The &lt;ratio> value is a positive (not zero or negative) &lt;integer>
10761084
followed by optional whitespace, followed by a solidus ('/'), followed by
1077-
optional whitespace, followed by a positive &lt;integer>.
1078-
Whitespace and &lt;integer> are defined by CSS 2.1.
1079-
[[!CSS21]]</p>
1085+
optional whitespace, followed by a positive &lt;integer>.</p>
10801086

1081-
<p>The &lt;resolution> value is a positive &lt;integer> immediately followed
1087+
<p>The &lt;resolution> value is a positive &lt;number> immediately followed
10821088
by a unit identifier (''dpi'' or ''dpcm'').</p>
10831089

1084-
<p>Other values used by this specification are the same as in other parts of
1085-
CSS, normatively defined by CSS 2.1. [[!CSS21]]</p>
1090+
<p>Whitespace, &lt;integer>, &lt;number> and other values used by this
1091+
specification are the same as in other parts of CSS, normatively defined by
1092+
CSS 2.1. [[!CSS21]]</p>
10861093

10871094

10881095
<h2 id="units">Units</h2>

0 commit comments

Comments
 (0)