Hi,
When you use an import directive in a style sheet, which rules come
first? The imported rules or the rules defined in the style sheet itself?
So if I have:
basic.css:
@import url(nav.css);
h1, h2, h3, h4, h5, h6 {
margin: 1em 0 1em 0;
font-family: Georgia, "Times New Roman", Time
Todd Edwards wrote:
> Quote from css-discuss.incutio.com:
>
> Why not put @import at the bottom of simple.css?
>
> According to the CSS specs, @import rules must precede any other CSS rules
> in a stylesheet, so this creates the need to place it in its own stylesheet
> for these purposes.
>
>
>
Lori Lay wrote:
> Hi,
>
> When you use an import directive in a style sheet, which rules come
> first? The imported rules or the rules defined in the style sheet itself?
CSS2.1 6.4.1 Cascading order
http://www.w3.org/TR/CSS21/cascade.html#cascading-order
"... 4. Finally, sort by order specifie
Ingo Chao wrote:
> Lori Lay wrote:
>
>> Hi,
>>
>> When you use an import directive in a style sheet, which rules come
>> first? The imported rules or the rules defined in the style sheet itself?
>>
>
> CSS2.1 6.4.1 Cascading order
> http://www.w3.org/TR/CSS21/cascade.html#cascading-order
Imported style sheets cascade and their weight depends on their import
order. Rules specified in a given style sheet override rules imported from
other style sheets. Imported style sheets can themselves import and override
other style sheets, recursively, and the same precedence rules apply.
On 5