Previous Message
Next Message

Re: [css-d] Proper Use of @import

Sent by Lachlan Cannon on 1 February 2002 01:01


> The pertinent part of what @import is for is "The
> '@import' rule allows 
> users to import style rules from other style sheets."
> 
> And frankly, I agree. Though I'll reserve specific
> judgement until I read 
> the notes that say using @import to hide styles from NN4
> is incorrect 
> usage.....I have to say that I am disappointed.
> 
> Here many of us have been trying to find a solution to
> create accessible, 
> (X)HTML + CSS sites that don't use tables for layout or
> JavaScript to 
> perform browser sniffing and stylesheet assignment, and
> it looks like we've 
> found the best solution in @import. It's NOT a hack, it's
> not a workaround 
> - it's a correct, accessible implementation of CSS;
> period. Whether that 
> was @import's original purpose or not, it's still valid
> use of the standard.

It's not that it's incorrect, but more that, IMHO it's
messy. That is it's messy to include @import in your html.
Blending languages shouldn't really be happening.. remember
the seperation of structure and presentation?

Also, browsers that don't implement tags, as a failsafe
tend to ignore tags, and print text between them. Thus they
might see @import s in the middle of their pages- not too
nice.

I have no problem with @import, but I believe it belongs in
your external stylesheets. So you could do a link for your
basic nn4 layout, and in that @import the more
sophisticated sheet.

Another thing is (I don't know how much this would effect
it) but it would take the browsers a little longer to drop
out of html parsing mode, into css parsing mode, then back
into html parsing mode again - just like you shouldn't keep
switching between php and html in php pages.

Lach
PS Sorry for these mostly non practical things - but maybe
some people will see the point of not using @import in your
html?


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com
Previous Message
Next Message

Message thread:

Possibly related: