Re: [CSS21] Test Suite

Chris Lilley wrote:

> MM> handle this syntax (probably due to the incompatible definition of
> MM> <style> element content between HTML 4, and XHTML 1).  The effect is that
> MM> the first rule is ignored (or all rules in the case of Firefox).
> 
> Bleurgh.

That was my reaction too.  Per conversation with Mark, this ONLY happens when 
the file is served as "text/html".  Using XML or XHTML MIME types works fine in 
firefox.

The reason CDATA sections in text/html cause issues is that the tag-soup parser 
doesn't really understand them, so the "<[CDATA[" part is passed to the CSS 
parser.  This last treats it as an error and skips forward, matching pairs of 
quotes, parentheses, and (most importantly) square brackets.  So the entire 
sheet is skipped.

Of course sending XHTML 1.1 markup (which these tests are) as text/html is an 
issue in itself...

-Boris

Received on Thursday, 22 July 2004 17:17:50 UTC