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

Re: [css21] @import parsing

From: Andrey Mikhalev <amikhal@abisoft.spb.ru>
Date: Tue, 10 Mar 2009 21:42:06 +0300 (MSK)
To: Bert Bos <bert@w3.org>
cc: www-style@w3.org
Message-ID: <Pine.LNX.4.63.0903102057570.23198@master.abisoft.spb.ru>
On Tue, 10 Mar 2009, Bert Bos wrote:

> The @import was designed using two principles (which in turn were meant
> to make it as easy as possible for users to remember how CSS worked):
>
> 1)šThe meaning of the rules in the imported style sheet doesn't depend
> on where the @import is called from. The caller only determines whether
> the style sheet is imported or not. Thus the caller (whether HTML or
> CSS) may attach conditions, such as Media Queries, but it may not
> change the meaning of any keyword or construct in the imported style.

latest proposals such as variables and constants shows that this
"principle" is just an error.

>
> 2) Any rule in an imported style sheet can be overridden by a rule with
> the same specificity in the importing style sheet, but never the other
> way round.

as defined in cascade specification. absolutely no needs to
force this by grammar, except for allowing some ugly UA implementation
claim css conformance ;)
not "principle", just a hack.

>
> These rules are reminiscent of the import statements in Java or Modula,
> but different from the #include of C. (The #include of C has
> more "power" in theory, but the principle of least power applies here,
> and import is easier to understand.)

not reminiscent. parser-only thing as in thousands languages.

to be honest, this weird restriction should be rewritten as e.g.:
for backward compatibility reasons, @import ignored after
first occurence of [invalid] @page,@font-face,@media or style rule.
Received on Tuesday, 10 March 2009 18:42:55 GMT

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