Skip to content

Commit d731b23

Browse files
committed
[css-cascade] Rephrase the rule for placement of @import, make it clear that misplacing it makes the rule invalid.
--HG-- extra : rebase_source : 90e400fb406d0657a2ffe6c996ed28e5fb40254d
1 parent b483f4f commit d731b23

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

css-cascade/Overview.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,11 @@ <h2 id=at-import><span class=secno>2. </span> Importing style sheets: the
265265

266266
<p> The <dfn id=atimport><code class=css>@import</code></dfn> rule
267267
allows users to import style rules from other style sheets. Any ‘<a
268-
href="#atimport"><code class=css>@import</code></a>’ rules must follow
269-
all ‘<code class=css>@charset</code>’ rules and precede all other
270-
at-rules and style rules in a style sheet. The ‘<a
268+
href="#atimport"><code class=css>@import</code></a>’ rules must precede
269+
all other at-rules and style rules in a stylesheet (besides ‘<code
270+
class=css>@charset</code>’, which must be the first thing in the
271+
stylesheet if it exists), or else the ‘<a href="#atimport"><code
272+
class=css>@import</code></a>’ rule is invalid. The ‘<a
271273
href="#atimport"><code class=css>@import</code></a>’ keyword must be
272274
followed by the URI of the style sheet to include. A string is also
273275
allowed; it will be interpreted as if it had url(…) around it.

css-cascade/Overview.src.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ <h2 id="at-import">
9696

9797
<p>
9898
The <dfn>''@import''</dfn> rule allows users to import style rules from other style sheets.
99-
Any ''@import'' rules must follow all ''@charset'' rules
100-
and precede all other at-rules and style rules in a style sheet.
99+
Any ''@import'' rules must precede all other at-rules and style rules in a stylesheet
100+
(besides ''@charset'', which must be the first thing in the stylesheet if it exists),
101+
or else the ''@import'' rule is invalid.
101102
The ''@import'' keyword must be followed by the URI of the style sheet to include.
102103
A string is also allowed;
103104
it will be interpreted as if it had url(&hellip;) around it.

0 commit comments

Comments
 (0)