Skip to content

Commit 7f33090

Browse files
committed
negative lengths are invalid
1 parent b03c0e4 commit 7f33090

2 files changed

Lines changed: 14 additions & 23 deletions

File tree

css3-mediaqueries/Overview.html

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -519,16 +519,6 @@ <h2 id=media0><span class=secno>2. </span>Media Queries</h2>
519519
</pre>
520520
</div>
521521

522-
<p>Expressions with with negative length values are always false.
523-
524-
<div class=example>
525-
<p>This media query is false:</p>
526-
527-
<pre>
528-
@media (min-width: -100px) { ... }
529-
</pre>
530-
</div>
531-
532522
<p>To avoid circular dependencies, it is never necessary to apply the style
533523
sheet in order to evaluate expressions. For example, the aspect ratio of a
534524
printed document may be influenced by a style sheet, but expressions
@@ -643,6 +633,13 @@ <h3 id=error><span class=secno>3.1 </span>Error Handling</h3>
643633
and is therefore ignored.</p>
644634
</div>
645635

636+
<div class=example>
637+
<p>This media query is invalid because negative lengths are not allowed
638+
for the &lsquo;<code class=css>width</code>&rsquo; media feature:</p>
639+
640+
<pre>@media (min-width: -100px) { ... }</pre>
641+
</div>
642+
646643
<li>
647644
<p><strong>Malformed media query.</strong> User agents are to handle
648645
unexpected tokens encountered while parsing a media query by reading

css3-mediaqueries/Overview.src.html

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -396,19 +396,6 @@ <h2 id="media0">Media Queries</h2>
396396
</pre>
397397
</div>
398398

399-
<p>Expressions with with negative length values are always false.
400-
401-
<div class="example">
402-
<p>This media query is false:
403-
404-
<pre>
405-
@media (min-width: -100px) { ... }
406-
</pre>
407-
</div>
408-
409-
410-
411-
412399
<p>To avoid circular dependencies, it is never necessary to apply the
413400
style sheet in order to evaluate expressions. For example, the aspect
414401
ratio of a printed document may be influenced by a style sheet, but
@@ -520,6 +507,13 @@ <h3>Error Handling</h3>
520507
value for the ''color'' media feature and is therefore ignored.</p>
521508
</div>
522509

510+
<div class="example">
511+
<p>This media query is invalid because negative lengths are not allowed
512+
for the ''width'' media feature:
513+
514+
<pre>@media (min-width: -100px) { ... }</pre>
515+
</div>
516+
523517
<li>
524518
<p><strong>Malformed media query.</strong> User agents are to handle
525519
unexpected tokens encountered while parsing a media query by reading until

0 commit comments

Comments
 (0)