Skip to content

Commit 091c0a7

Browse files
committed
[dbaron revision history] Pull in text on @import. (date: 2003/07/16 22:19:59)
1 parent a1df15e commit 091c0a7

1 file changed

Lines changed: 37 additions & 1 deletion

File tree

css3-syntax/Overview.src.html

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ <h3 id="at-rules" class="index-def" title="at-rules">At-rules</h3>
621621

622622
<p>CSS3 user agents must <span class="index-inst" title="ignore"><a
623623
href="#ignore">ignore</a></span> any <a
624-
href="cascade.html#at-import">'@import'</a> rule that occurs inside a <a
624+
href="#at-import">'@import'</a> rule that occurs inside a <a
625625
href="#block">block</a> or that doesn't precede all rule sets.
626626

627627
<div class="illegal-example"><p>
@@ -1220,6 +1220,42 @@ <h3 id="at-import">Style sheets including other style sheets:
12201220
way. Further, state that @import without a medium must ignore any
12211221
medium specified for the same style sheet in a link from a document]</p>
12221222

1223+
<p>The <span class="index-def"
1224+
title="@import"><dfn>'@import'</dfn></span> rule allows users to
1225+
import style rules from other style sheets. Any @import rules must
1226+
precede all rule sets in a style sheet. The '@import' keyword must be
1227+
followed by the URI of the style sheet to include. A string is also
1228+
allowed; it will be interpreted as if it had url(...) around it.</p>
1229+
1230+
<div class="example"><p>
1231+
The following lines are equivalent in meaning and illustrate both
1232+
'@import' syntaxes (one with "url()" and one with a bare string):</p>
1233+
1234+
<pre>
1235+
@import "mystyle.css";
1236+
@import url("mystyle.css");
1237+
</pre>
1238+
</div>
1239+
1240+
<p>So that user agents can avoid retrieving resources for unsupported
1241+
<a href="media.html">media types</a>, authors may specify
1242+
media-dependent <span class="index-inst"
1243+
title="@import">@import</span> rules. These <span class="index-def"
1244+
title="conditional import|media-dependent import">conditional
1245+
imports</span> specify comma-separated media types after the URI.</p>
1246+
1247+
<div class="example">
1248+
<p>The following rules illustrate how @import rules can be made media-dependent:</p>
1249+
1250+
<pre>
1251+
@import url("fineprint.css") print;
1252+
@import url("bluish.css") projection, tv;
1253+
</pre>
1254+
</div>
1255+
1256+
<p>In the absence of any media types, the import is
1257+
unconditional. Specifying 'all' for the medium has the same effect.</p>
1258+
12231259

12241260
<h2>Defining namespaces: the <code>@namespace</code> rule</h2>
12251261

0 commit comments

Comments
 (0)