[Bug 2920] Several invalid forms using @charset passed as valid

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2920





------- Comment #3 from cecil@cecilward.com  2006-04-21 17:23 -------
Having taken another look, from a CSS2.0 standpoint

CSS 2 section 4.4 states

"@charset rule [...] must appear at the very start of the document, not
preceded by any characters".

So by this paragraph, the validator should report an error in the case where
some whitespace and/or a comment, say, precedes the @charset. This is a fault.
Because of the restrictive specification of @charset, the CSS validator is not
at liberty to pre-strip all comments or strip whitespace in an initial phase
before doing futher syntactical analysis. Looking at the output displayed in
the case of an error suggests that it may pre-strip comments.

As for the CSS2 documents, the restriction expressed in that English sentence
is not reflected in the example formal grammar in the CSS2 appendix D, which is
too lax.

Received on Friday, 21 April 2006 17:23:21 UTC