You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Here is the same example written in HTML, XHTML, XML, @import and
478
483
@media:</p>
479
484
480
-
<pre>
481
-
<spanclass=html-example><link rel="stylesheet" media="<em>screen and (color), projection and (color)</em>" rel="stylesheet" href="example.css"></span>
485
+
<pre><spanclass=html-example><link rel="stylesheet" media="<em>screen and (color), projection and (color)</em>" rel="stylesheet" href="example.css"></span>
482
486
483
487
<spanclass=html-example><link rel="stylesheet" media="<em>screen and (color), projection and (color)</em>" rel="stylesheet" href="example.css" /></span>
484
488
485
489
<spanclass=xml-example><?xml-stylesheet media="<em>screen and (color), projection and (color)</em>" rel="stylesheet" href="example.css" ?></span>
486
490
487
491
<spanclass=css-example>@import url(example.css) screen and (color), projection and (color);</span>
488
492
489
-
<spanclass=css-example>@media screen and (color), projection and (color) { ... }</span>
490
-
</pre>
493
+
<spanclass=css-example>@media screen and (color), projection and (color) { ... }</span></pre>
491
494
492
495
<pclass=note>Just like HTML, the <ahref="#XMLSTYLE"
493
496
rel=biblioentry>[XMLSTYLE]<!--{{XMLSTYLE}}--></a> specification has not
<p>In the media queries syntax, the comma expresses a logical OR, while the
309
-
''and'' keyword expresses a logical AND.</p>
310
317
311
-
<p>The logical NOT can be expressed through the ''not'' keyword. </p>
318
+
<p>The logical NOT can be expressed through the ''not'' keyword. The
319
+
presence of the keyword ''not'' at the beginning of the media query negates
320
+
the result. I.e., if the media query had been true without the ''not''
321
+
keyword it will become false, and vice versa. User agents that only support
322
+
media types (as described in HTML4) will not recognize the ''not'' keyword
323
+
and the associated style sheet is therefore not applied.</p>
312
324
313
325
<divclass="example">
314
-
<pre>
315
-
<spanclass="html-example"><link rel="stylesheet" media="<em>not screen and (color)</em>" href="example.css" /></span>
316
-
</pre>
326
+
<pre><spanclass="html-example"><link rel="stylesheet" media="<em>not screen and (color)</em>" href="example.css" /></span></pre>
317
327
</div>
318
328
319
-
<p>The presence of the keyword ''not'' at the beginning of the query
320
-
negates the result. I.e., if the media query had been true without the
321
-
''not'' keyword it will become false, and vice versa. User agents that
322
-
only support media types (as described in HTML4) will not recognize
323
-
the ''not'' keyword and the associated style sheet is therefore not
324
-
applied.</p>
325
-
326
329
<p>The keyword ''only'' can also be used to hide style sheets from
327
330
older user agents. User agents must process media queries starting
328
331
with ''only'' as if the ''only'' keyword was not present.</p>
329
332
330
333
<divclass="example">
331
-
<pre>
332
-
<spanclass="html-example"><link rel="stylesheet" media="<em>only screen and (color)</em>" href="example.css" /></span>
333
-
</pre>
334
+
<pre><spanclass="html-example"><link rel="stylesheet" media="<em>only screen and (color)</em>" href="example.css" /></span></pre>
334
335
</div>
335
336
336
337
<p>The media queries syntax can be used with HTML, XHTML, XML [[XMLSTYLE]] and the @import and @media rules of CSS.</p>
337
338
338
339
<divclass="example">
339
340
<p>Here is the same example written in HTML, XHTML, XML, @import and @media:</p>
340
341
341
-
<pre>
342
-
<spanclass="html-example"><link rel="stylesheet" media="<em>screen and (color), projection and (color)</em>" rel="stylesheet" href="example.css"></span>
342
+
<pre><spanclass="html-example"><link rel="stylesheet" media="<em>screen and (color), projection and (color)</em>" rel="stylesheet" href="example.css"></span>
343
343
344
344
<spanclass="html-example"><link rel="stylesheet" media="<em>screen and (color), projection and (color)</em>" rel="stylesheet" href="example.css" /></span>
345
345
346
346
<spanclass="xml-example"><?xml-stylesheet media="<em>screen and (color), projection and (color)</em>" rel="stylesheet" href="example.css" ?></span>
347
347
348
348
<spanclass="css-example">@import url(example.css) screen and (color), projection and (color);</span>
349
349
350
-
<spanclass="css-example">@media screen and (color), projection and (color) { ... }</span>
351
-
</pre>
350
+
<spanclass="css-example">@media screen and (color), projection and (color) { ... }</span></pre>
352
351
353
352
<pclass="note">Just like HTML, the [[XMLSTYLE]] specification has not yet
354
353
been updated to use media queries in the <code>media</code> pseudo-attribute.</p>
0 commit comments