W3C home > Mailing lists > Public > www-style@w3.org > January 2008

Re: [CSS 2.1] @charset, @import, and error recovery

From: L. David Baron <dbaron@dbaron.org>
Date: Sat, 26 Jan 2008 16:42:31 -0800
To: Justin Rogers <justrog@microsoft.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <20080127004231.GA10946@ridley.dbaron.org>

On Saturday 2008-01-26 14:59 -0800, Justin Rogers wrote:
> "Any @import rules must precede all other rules (except the @charset rule, if present)."
> Well that is clear. NO other rules are allowed, but what about failed rules? Rules that don't make sense:

I've always assumed that unknown or invalid rules don't count for
this.  I think that's probably the most useful behavior for

I think it's also reasonably clear in the spec, which says the
following (note "valid"):
# CSS 2.1 user agents must ignore any '@import' rule that occurs
# inside a block or after any valid statement other than an @charset
# or an @import rule.
-- http://www.w3.org/TR/2007/CR-CSS21-20070719/syndata.html#at-rules

I think it's also what Ian tests in test 61c in
which is part of http://hixie.ch/tests/evil/css/import/ .

> Browsers are inconsistent here.



L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Sunday, 27 January 2008 00:42:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:33 UTC