This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The CSS validator doesn't seem to know about CDATA marked sections in XML. So for example <style type="text/css"><![CDATA[ .note { color:green } ]]></style> gives an error Lexical error at line 1, column 3. Encountered: "[" (91), after : "<!" The CSS parser should not see this syntax because the XML parser removes it. It looks as if whatever is doing the parsing is not XML; alternatively, its the CSS pasrser (which allows HTML and XML comments, <!-- --> in CSS due to common bugwards-compatible ways of hiding CSS from older HTML browsers).
Relevant to this, when serving as text/html: http://www.w3.org/TR/xhtml-media-types/#C_4
A few test cases: http://www.w3.org/2009/02/xhtmlcss.html served as application/xhtml+css, cdata section not escaped. The validator accept it as it should. http://www.w3.org/2009/02/xhtmlcss.html served as text/html, cdata section not escaped. The validator refuses to parse it as it should. (although the error should be better than it is now) http://www.w3.org/2009/02/xhtmlcssescaped.html served as text/html, cdata section escaped per http://www.w3.org/TR/xhtml-media-types/#C_4 The validator accept it as it should.