CSS properties - @import rule

revision:


@import rule

- allows you to import a style sheet into another style sheet. The @import rule must be at the top of the document (but after any @charset declaration). The @import rule also supports media queries, so you can allow the import to be media-dependent.

CSS syntax : @import url | string list-of-mediaqueries;

Property values:

url : a url or a string representing the location of the resource to import. The url may be absolute or relative

list-of-mediaqueries : a comma-separated list of media queries conditioning the application of the CSS rules defined in the linked URL

example
code:
                    @import "navigation.css"; /* Using a string */
                    or
                    @import url("navigation.css"); /* Using a url */
                
code:
                    @import "printstyle.css" print;
                    @import "mobstyle.css" screen and (max-width: 768px);