Re: media queries syntax

On Fri, 16 Oct 2009, Giovanni Campagna wrote:

>> Trying to parse (foo) with a CSS21 aprser based on CSS21 syntax will fail..
>
> While instead it is legally allowed by the core syntax, which says:
> at-rule: ATKEYWORD S* any* [ block | ';' S* ];
> any: [ IDENT | NUMBER | PERCENTAGE | DIMENSION | STRING
>              | DELIM | URI | HASH | UNICODE-RANGE | INCLUDES
>              | DASHMATCH | ':' | FUNCTION S* any* ')'
>              | '(' S* any* ')' | '[' S* any* ']' ] S*;
> so (foo) matches the "any" production (going '(' IDENT ')' ), and
> @media (any) is good core syntax, but ignored by forward compatible
> parsing rules for UA that don't implement the "foo" media feature.

Thanks for the pointer, and now I am wondering... would it be possible to 
add productions for  '(' term ')' and '[' term ']' in the versionned 
grammar? (even if those productions are not reachable from 'stylesheet') 
That would be extremely helpful. (and now I look at the possible issues in 
upgrading the CSS Validator grammar...)

-- 
Baroula que barouleras, au tiéu toujou t'entourneras.

         ~~Yves

Received on Monday, 19 October 2009 14:02:56 UTC