Skip to content

Commit 1a38cd5

Browse files
committed
deal with all media queries being ignored
1 parent bb374c4 commit 1a38cd5

2 files changed

Lines changed: 27 additions & 30 deletions

File tree

css3-mediaqueries/Overview.html

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,8 @@ <h3 id=error><span class=secno>3.1 </span>Error Handling</h3>
679679
until the end of the media query, while observing <a
680680
href="http://www.w3.org/TR/CSS21/syndata.html#block">the rules for
681681
matching pairs</a> of (), [], {}, "", and '', and correctly handling
682-
escapes. <a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a></p>
682+
escapes. Media queries with unexpected tokens are ignored. <a
683+
href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a></p>
683684

684685
<div class=example>
685686
<pre>@media (example, all,), speech { /* only applicable to speech devices */ }
@@ -693,20 +694,18 @@ <h3 id=error><span class=secno>3.1 </span>Error Handling</h3>
693694

694695
<pre>@media all and(color) { ... }</pre>
695696
</div>
696-
<!--
697-
Removed as this might cause the wrong style sheet to apply if a part of the
698-
media query is missing. This will now cause the respective media query to
699-
be ignored per the previous rule.
700-
701-
<li>
702-
<p><strong>Unexpected end of media query.</strong> User agents are to
703-
close all open constructs (such as parenthesis and curly braces) upon
704-
encountering an unexpected end of a media query.</p>
705-
706-
<p class="note">This error handling condition is only meaningful outside
707-
of CSS.</p>
708-
-->
709-
697+
698+
<p>When all media queries in a media query list are ignored it is the
699+
same as if "<code>not all</code>" was specified.</p>
700+
701+
<div class=example>
702+
<p>The following lists of media queries would all end up as "<code>not
703+
all</code>":</p>
704+
705+
<pre>@media test, @test { ... }
706+
@media example { ... }
707+
@media screen and (min-example), example { ...}</pre>
708+
</div>
710709
</ul>
711710

712711
<h2 id=media1><span class=secno>4. </span>Media features</h2>

css3-mediaqueries/Overview.src.html

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ <h3>Error Handling</h3>
538538
the end of the media query, while observing
539539
<a href="http://www.w3.org/TR/CSS21/syndata.html#block">the rules for
540540
matching pairs</a> of (), [], {}, "", and '', and correctly handling
541-
escapes. [[!CSS21]]
541+
escapes. Media queries with unexpected tokens are ignored. [[!CSS21]]
542542

543543
<div class="example">
544544
<pre>@media (example, all,), speech { /* only applicable to speech devices */ }
@@ -551,20 +551,18 @@ <h3>Error Handling</h3>
551551
the functional notation syntax.)</p>
552552
<pre>@media all and(color) { ... }</pre>
553553
</div>
554-
555-
<!--
556-
Removed as this might cause the wrong style sheet to apply if a part of the
557-
media query is missing. This will now cause the respective media query to
558-
be ignored per the previous rule.
559-
560-
<li>
561-
<p><strong>Unexpected end of media query.</strong> User agents are to
562-
close all open constructs (such as parenthesis and curly braces) upon
563-
encountering an unexpected end of a media query.</p>
564-
565-
<p class="note">This error handling condition is only meaningful outside
566-
of CSS.</p>
567-
-->
554+
555+
<p>When all media queries in a media query list are ignored it is the same
556+
as if "<code>not all</code>" was specified.</p>
557+
558+
<div class="example">
559+
<p>The following lists of media queries would all end up as "<code>not
560+
all</code>":</p>
561+
562+
<pre>@media test, @test { ... }
563+
@media example { ... }
564+
@media screen and (min-example), example { ...}</pre>
565+
</div>
568566
</ul>
569567

570568
<h2 id="media1">Media features</h2>

0 commit comments

Comments
 (0)