Re: [css3-mediaqueries] Malformed media query error handling

Le 27/04/2012 10:49, Vasily Stepanov a écrit :
> Consider this malformed CSS example:
> @media {example, all,}, speech { /* only applicable to speech devices */ }
>
> () block from the previous example has been replaced with {} block.
>
> So it is unclear how should I parse this malformed CSS.
>
> According to CSS21 I have to parse it like this:
> @media { /* error while parsing rulesets */ }
> /* error while parsing selectors */
>
> According to css3-mediaqueries I have to parse it like this:
> @media /* error while parsing media query */ speech { /* ... */ }

Hi,

It is my understanding that for your example the stylesheet parser will 
find @media, read until the end of the block and produce an at-rule. 
Only then the "head" of the at-rule (a list of zero tokens) is parsed as 
an empty media query.

Regards,
-- 
Simon Sapin

Received on Friday, 27 April 2012 09:26:02 UTC