W3C home > Mailing lists > Public > www-style@w3.org > April 2012

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

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Fri, 27 Apr 2012 11:25:29 +0200
Message-ID: <4F9A6609.4050104@kozea.fr>
To: Vasily Stepanov <vasily.stepanov@gmail.com>
CC: www-style@w3.org
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:52 GMT