Previous Message
Next Message

Re: [css-d] multiple @imports

Sent by Eric A. Meyer on 29 January 2002 09:09


At 8:29 -0500 1/29/02, Kevin Smith wrote:

>The spec states that "Any @import rules must precede all rule sets in a
>style sheet." Could be more explicit, I suppose, but a style sheet with
>multiple @import's certainly validates.

    Yes, it's fine (according to CSS) to have multiple @import 
statements as long as they're all at the beginning of the stylesheet. 
Only an @charset could precede them-- and would have to, since if you 
use an @charset it's required to be the first line of the stylesheet. 
You don't have to use @charset, though, and unless it sounds to you 
like something you're pretty sure you need then you almost certainly 
don't need it.  In my opinion, that is.
    I recall that IE5.x/Win allows @import statements to be anywhere 
in a stylesheet, but don't do that, as it will break in other 
browsers (as it should) and there's no sense learning bad habits.

--
Eric A. Meyer (http://www.meyerweb.com/eric/), List Chaperone
"CSS is much too interesting and elegant to be not taken seriously."
   -- Martina Kosloff
Previous Message
Next Message

Message thread: