We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE

@import Redirect 1


The @import CSS at-rule allows to import style rules from other style sheets. These rules must precede all other types of rules, except @charset rules; as it is not a nested statement, it cannot be used inside conditional group at-rules.

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 queries after the URI. In the absence of any media query, the import is unconditional. Specifying all for the medium has the same effect.


@import url;                      or
@import url list-of-media-queries;

where :

Is a <string> or a <uri> representing the location of the resource to import. The url may be an absolute or relative url. Note that the url needn't actually specify a file; it can just specify the package name and part, and the appropriate file will be chosen automatically (eg. chrome://communicator/skin/). See here for more information.
Is a comma-separated list of media queries conditioning the application of the css rules defined in the linked url. If the browser doesn't support any of these media types, it won't even load the linked resource.


@import url("fineprint.css") print;
@import url("bluish.css") projection, tv;
@import 'custom.css';
@import url("chrome://communicator/skin/");
@import "common.css" screen, projection;
@import url('landscape.css') screen and (orientation:landscape);


Specification Status Comment
Media Queries Recommendation Extended the syntax to support any media query and not only simple media types.
CSS Level 2 (Revision 1) Recommendation Added support for <string> to denote the url of a stylesheet,
and requirement to insert the @import rule at the beginning of the CSS document.
CSS Level 1 Recommendation  

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) (Yes) 5.5 (Yes) (Yes)
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) (Yes) 5.5 (Yes) (Yes)

See also

Document Tags and Contributors

 Contributors to this page: Sheppy
 Last updated by: Sheppy,