W3C home > Mailing lists > Public > www-style@w3.org > February 2009

Re: [css21] @import parsing

From: (wrong string) ş <faruk@apple.com>
Date: Tue, 10 Feb 2009 13:02:50 -0800
Message-id: <31E2B353-AC6B-47B3-8415-E5093898CFB2@apple.com>
To: www-style@w3.org
On Feb 4, 2009, at 1:55 PM, L. David Baron wrote:

> On Wednesday 2009-02-04 13:43 -0800, Peter Linss wrote:
>> Agreed. Perhaps the text should read: "after any well-formed  
>> statement",
>> or simply "after any statement".
>
> I'm a little uncomfortable with ignoring @import after an unknown
> @-rule.  That would mean we couldn't extend CSS with new @-rules
> that belong before @import.  (For example, an @base rule to set the
> base URL, like html:base or xml:base.)

I think the argument was not to ignore @import after a valid  
_anything_, but after valid regular CSS rules, e.g. once you start  
using a selector and properties, @import should no longer import.  
Prior to that, though, you can (and should continue to be able to) use  
as many @-rules with any @-names as you want.

So, this would import "foo.css":


@blah something {
	…
}
@bar {
	…
}
@import "foo.css";
selector {
	prop: value;
}


…but this would not:


@blah something {
	…
}
selector {
	prop: value;
}
@import "foo.css";



That was my understanding of it, anyway. Either way, I think that's a  
viable approach.

Faruk
Received on Tuesday, 10 February 2009 21:03:32 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:16 GMT