mozilla

Revision 20207 of @import

  • Revision slug: CSS/@import
  • Revision title: @import
  • Revision id: 20207
  • Created:
  • Creator: Nickolay
  • Is current revision? No
  • Comment /* See Also */ testing [[Template:cssxref]]; also remove the useless '''@import''' item

Revision Content

{{template.CSSRef()}}

Summary

@import allows users to import style rules from other style sheets.

Syntax

@import "url";
@import url("url");

Notes

So that user agents can avoid retrieving resources for unsupported media types, authors may specify media-dependent @import rules. These conditional imports specify comma-separated media types after the URI. In the absence of any media types, the import is unconditional. Specifying 'all' for the medium has the same effect.

Examples

@import url("fineprint.css") print;
@import url("bluish.css") projection, tv;

Specifications

Browser Compatibility

See Also

{{template.Cssxref("@media")}}, {{template.Cssxref("@font-face")}}

Revision Source

<p> 
{{template.CSSRef()}}
</p>
<h3 name="Summary"> Summary </h3>
<p><code>@import</code> allows users to import style rules from other style sheets.
</p>
<h3 name="Syntax"> Syntax </h3>
<pre class="eval">@import "<i>url</i>";
@import url("<i>url</i>");
</pre>
<h3 name="Notes"> Notes </h3>
<p>So that user agents can avoid retrieving resources for unsupported media types, authors may specify media-dependent @import rules. These conditional imports specify comma-separated media types after the URI.  In the absence of any media types, the import is unconditional. Specifying 'all' for the medium has the same effect.
</p>
<h3 name="Examples"> Examples </h3>
<pre>@import url("fineprint.css") print;
@import url("bluish.css") projection, tv;
</pre>
<h3 name="Specifications"> Specifications </h3>
<ul><li> <a class="external" href="http://www.w3.org/TR/CSS21/cascade.html#at-import">CSS 2.1</a>
</li></ul>
<h3 name="Browser_Compatibility"> Browser Compatibility </h3>
<h3 name="See_Also"> See Also </h3>
<p>{{template.Cssxref("@media")}}, {{template.Cssxref("@font-face")}}
</p>
Revert to this revision