8000 add note about comment tokens; add and(color) example; ffix orientati… · w3c/csswg-drafts@fb7a182 · GitHub
Skip to content

Commit fb7a182

Browse files
committed
add note about comment tokens; add and(color) example; ffix orientation examples
1 parent f9c238c commit fb7a182

2 files changed

Lines changed: 33 additions & 9 deletions

File tree

css3-mediaqueries/Overview.html

Lines changed: 19 additions & 6 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 6 April 2008</h2>
27+
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft 7 April 2008</h2>
2828

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

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

3535
<dt>Latest version:
3636

@@ -551,6 +551,11 @@ <h2 id=syntax><span class=secno>3. </span>Syntax</h2>
551551
: IDENT
552552
;</pre>
553553

554+
<p>COMMENT tokens, as defined by CSS2, do not occur in the grammar (to keep
555+
it readable), but any number of these tokens may appear anywhere between
556+
other tokens. <a href="#CSS21"
557+
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
558+
554559
<p>The following new definitions are introduced:
555560

556561
<pre>
@@ -646,6 +651,14 @@ <h3 id=error><span class=secno>3.1 </span>Error Handling</h3>
646651
<pre>@media (example, all,), speech { /* only applicable to speech devices */ }
647652
@media &amp;test, screen { /* only applicable to screen devices */ }</pre>
648653
</div>
654+
655+
<div class=example>
656+
<p>The following is an malformed media query because having no space
657+
between "and" and the expression is not allowed. (That is reserved for
658+
the functional notation syntax.)</p>
659+
660+
<pre>@media all and(color) { ... }</pre>
661+
</div>
649662
<!--
650663
Removed as this might cause the wrong style sheet to apply if a part of the
651664
media query is missing. This will now cause the respective media query to
@@ -690,8 +703,8 @@ <h2 id=media1><span class=secno>4. </span>Media features</h2>
690703
<li>Properties may accept more complex values, e.g., calculations that
691704
involve several other values. Media features only accept single values:
692705
one keyword, one number, or a number with a unit identifier. (The only
693-
exeptions are the aspect-ratio' and &lsquo;<span
694-
class=property>device-aspect-ratio</span>&rsquo; media features.)
706+
exeptions are the &lsquo;<code class=css>aspect-ratio</code>&rsquo; and
707+
&lsquo;<code class=css>device-aspect-ratio</code>&rsquo; media features.)
695708
</ul>
696709

697710
<div class=example>
@@ -831,8 +844,8 @@ <h3 id=orientation><span class=secno>4.5 </span>orientation</h3>
831844

832845
<div class=example>
833846
<pre>
834-
@media all and (portrait) { ... }
835-
@media all and (landscape) { ... }
847+
@media all and (orientation:portrait) { ... }
848+
@media all and (orientation:landscape) { ... }
836849
</pre>
837850
</div>
838851

css3-mediaqueries/Overview.src.html

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,10 @@ <h2>Syntax</h2>
426426
media_feature
427427
: IDENT
428428
;</pre>
429+
430+
<p>COMMENT tokens, as defined by CSS2, do not occur in the grammar (to keep
431+
it readable), but any number of these tokens may appear anywhere between
432+
other tokens. [[!CSS21]]</p>
429433

430434
<p>The following new definitions are introduced:</p>
431435

@@ -520,6 +524,13 @@ <h3>Error Handling</h3>
520524
<pre>@media (example, all,), speech { /* only applicable to speech devices */ }
521525
@media &amp;test, screen { /* only applicable to screen devices */ }</pre>
522526
</div>
527+
528+
<div class="example">
529+
<p>The following is an malformed media query because having no space
530+
between "and" and the expression is not allowed. (That is reserved for
531+
the functional notation syntax.)</p>
532+
<pre>@media all and(color) { ... }</pre>
533+
</div>
523534

524535
<!--
525536
Removed as this might cause the wrong style sheet to apply if a part of the
@@ -566,7 +577,7 @@ <h2 id="media1">Media features</h2>
566577
<li>Properties may accept more complex values, e.g., calculations that
567578
involve several other values. Media features only accept single
568579
values: one keyword, one number, or a number with a unit identifier.
569-
(The only exeptions are the aspect-ratio' and 'device-aspect-ratio'
580+
(The only exeptions are the ''aspect-ratio'' and ''device-aspect-ratio''
570581
media features.)
571582

572583
</li>
@@ -723,8 +734,8 @@ <h3>orientation</h3>
723734
<div class="example">
724735

725736
<pre>
726-
@media all and (portrait) { ... }
727-
@media all and (landscape) { ... }
737+
@media all and (orientation:portrait) { ... }
738+
@media all and (orientation:landscape) { ... }
728739
</pre>
729740
</div>
730741

0 commit comments

Comments
 (0)