1- <h1>CSS Cascading and Inheritance Level 4 </h1>
1+ <h1>CSS Cascading and Inheritance Level 3 </h1>
22
33<pre class='metadata'>
44Shortname : css-cascade
@@ -40,13 +40,27 @@ Introduction</h2>
4040Importing Style Sheets: the ''@import'' rule</h2>
4141
4242 The <dfn>@import</dfn> rule allows users to import style rules from other style sheets.
43+ If an ''@import'' rule refers to a valid stylesheet,
44+ user agents must treat the contents of the stylesheet as if they were written in place of the ''@import'' rule.
45+
46+ <p class='example'>
47+ For example, declarations in style rules from imported stylesheets interact with the cascade
48+ as if they were written literally into the stylesheet at the point of the ''@import'' .
49+ Similarly, style rules in a stylesheet imported into a scoped stylesheet
50+ are scoped in the same way.
51+
4352 Any ''@import'' rules must precede all other at-rules and style rules in a style sheet
4453 (besides ''@charset'' , which must be the first thing in the style sheet if it exists),
4554 or else the ''@import'' rule is invalid.
4655 The syntax of ''@import'' is:
4756
4857 <pre class='prod'>@import [ <<url>> | <<string>> ] <<media-query-list>> ? ;</pre>
4958
59+ Where the <<url>> or <<string>> gives the URL of the style sheet to be imported,
60+ and the optional <<media-query-list>>
61+ (the <dfn>import conditions</dfn> )
62+ states the conditions under which it applies.
63+
5064 If a <<string>> is provided,
5165 it must be interpreted as a url with the same value.
5266
@@ -61,20 +75,9 @@ Importing Style Sheets: the ''@import'' rule</h2>
6175 </pre>
6276 </div>
6377
64- If an ''@import'' rule refers to a valid stylesheet,
65- user agents must treat the contents of the stylesheet as if they were written in place of the ''@import'' rule.
66-
67- <p class='example'>
68- For example, declarations in style rules from imported stylesheets interact with the cascade
69- as if they were written literally into the stylesheet at the point of the ''@import'' .
70- Similarly, style rules in a stylesheet imported into a scoped stylesheet
71- are scoped in the same way.
72-
73- An ''@import'' rule can be media-dependent:
74- such media-dependent imports include a comma-separated list of “media queries” after the URI,
75- which specify to which media the imported style sheet applies.
76- In the absence of any media query, the import is unconditional.
77- (Specifying ''@media/all'' for the medium has the same effect.)
78+ The <a>import conditions</a> allow the import to be media-dependent.
79+ In the absence of any <a>import conditions</a> , the import is unconditional.
80+ (Specifying ''@media/all'' for the <<media-query-list>> has the same effect.)
7881
7982 The evaluation and full syntax of the expressions after the URL
8083 is defined by the <a href="http://www.w3.org/TR/css3-mediaqueries/">Media Queries</a> specification [[!MEDIAQ]] .
0 commit comments