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.2.0+W3C-0.50 : Monday, 7 December 2009 18:16:06 GMT