Re: [css3-mediaqueries] @media and @import

Anne van Kesteren wrote:
> 
> I found a small issue with error handling in both Firefox (3.2a1pre) and 
> Opera (10ish) that can probably be ascribed to the Media Queries 
> specification. It seems both "violate" the core syntax error recovery 
> rules when parsing media queries after an @media block. That is,
> 
>   @media test;,all { body { background:lime } }
> 
> gives a light green background rather than nothing at all. (Note the 
> semicolon.)
> 
> It seems wise not to violate the core syntax error recovery rules, which 
> begs the question whether it's ok that the parsing rules for @media and 
> media="" are slightly different and which specification should ensure 
> that rules are followed. As in theory media queries is independent of 
> the various implementations of it (e.g. in CSS and HTML).
> 
> So I think it makes the most sense that this is articulated in the 
> definition of @media and @import in CSS Level 3, but if people feel this 
> really should be addressed by the Media Queries specification I'm open 
> for suggestions.

I think you could note in the Malformed media query part of the Media
Queries specification that tokens outside brackets and quotes that would
normally end one of the media query's ancestor productions in the host
language should likewise terminate the media query. And give this bit of
malformed CSS as an example. Or something like that.

~fantasai

Received on Monday, 8 December 2008 19:50:06 UTC