W3C home > Mailing lists > Public > www-style@w3.org > June 2003

RE: @import

From: David Balch <david.balch@continuing-education.oxford.ac.uk>
Date: Mon, 30 Jun 2003 13:37:27 +0100
Message-ID: <CCDA876B4148874F8F554995799FF1FB207485@springbok.conted.ox.ac.uk>
To: www-style@w3.org

Hi,

> From: Jukka K. Korpela [mailto:jkorpela@cs.tut.fi]
> On Mon, 30 Jun 2003, David Balch wrote:
> 
> > It's worth bearing in mind that this is is illegal in CSS2 
> (at least in my understanding).
> 
> Exactly _what_ is illegal?

Sorry, I should have been more explicit.

The illegal bit (given in Jens Meiert's email) is putting @import after
other styles, to make the rules in @import superceed the linked styles for
older browsers.

> The specification says that @import, if present, must appear 
> first in a style sheet. What's the problem with that? 

Jens suggested that @import be used *after* the linked sheet, so that's
illegal.

[snip]

> Naturally this means that the style sheets need to be 
> designed taking into
> account that other things being equal, declarations in the @import'ed
> style sheet will "lose" to declarations in the importing style sheet.
> So when needed, make sure other things aren't equal, e.g. by 
> using more
> specific selectors. (Or even !important.)

Right. Hence the idea of putting @import after the linked sheet, in order to
"win".

I suspect we are thinking along the same lines, but my previous email wasn't
as clear as I could have been :-/

> 
> Regarding the development of the CSS specifications, the topic of this
> list, I might raise the question whether the restriction of putting
> @import first should be removed. Is there any _logical_ 
> reason to it? If

I'd be interested in the reasoning as well...

Cheers,
Dave.

> not, hopefully the technical issues could be settled down. CSS is
> difficult and confusing by its very nature; it shouldn't be made even
> harder by imposing arbitrary, hard-to-remember restrictions.
> 
> -- 
> Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
> 
Received on Monday, 30 June 2003 08:37:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:22 GMT