Skip to content

Commit 8519341

Browse files
committed
[css2] Added "@import url() media"
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%40310
1 parent fb5ab26 commit 8519341

1 file changed

Lines changed: 27 additions & 5 deletions

File tree

css2/media.src

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: media.src,v 1.19 1997-10-29 04:39:27 ian Exp $ -->
3+
<!-- $Id: media.src,v 1.20 1997-10-29 22:30:56 bbos Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Media types</TITLE>
@@ -43,12 +43,14 @@ style sheets:
4343
<UL>
4444

4545
<LI>Specify the target medium from a style sheet with the <span
46-
class="index-def" title="@media">@media</span> at-rule.
46+
class="index-def" title="@media">@media</span> or <span
47+
class="index-def" title="@import">@import</span> at-rules.
4748

4849
<div class="example"><P>
4950
<PRE>
51+
@import url(loudvoice.css) speech;
5052
@media print {
51-
/* style sheet "foo" goes here */
53+
/* style sheet for print goes here */
5254
}
5355
</PRE>
5456
</div>
@@ -97,8 +99,28 @@ sheet:</P
9799
}
98100
</pre>
99101

100-
<P>All @import rules in a @media block must appear before
101-
the other rules in the block.
102+
<H3>The media-dependent @import rule</h3>
103+
104+
<p>The <a href="cascade.html">@import</a> rule can be made <span
105+
class="index-inst" title="@import"><span class="index-def"
106+
title="conditional import|media-dependent
107+
import">conditional</span></span> on one or more medium types, by
108+
listing the media after the URL. Multiple media are separated by
109+
commas, as after the @media.
110+
111+
<div class="example">
112+
<pre>
113+
@import url(fineprint.css) print;
114+
@import url(blueish.css) projection, tv;
115+
</pre>
116+
</div>
117+
118+
<p>This has the same effect as if the imported style sheet were
119+
wrapped in an @media rule for the same media, but it may save the UA a
120+
fruitless download.
121+
122+
<p>In the absence of any media types, the import is
123+
unconditional. Specifying 'all' for the medium has the same effect.
102124

103125
<H2><a name="media-types">Recognized media types</a></H2>
104126

0 commit comments

Comments
 (0)