Re: Parsing media queries

On Nov 14, 2007, at 16:47, fantasai wrote:

> Henri Sivonen wrote:
>> Does that mean ignoring for UA processing but counting as errors as  
>> far as validation goes?
>
> Yes. A valid media query would have to conform to the syntax given in
> the draft (once it's updated to account for whitespace). We probably
> should add a statement to that effect.

OK.

>> Also, are the keywords supposed to be tokenized as idents from CSS3  
>> Syntax and then compared against a list of known names or are the  
>> key words in theory part of the low level syntax? (I supposed this  
>> only makes a difference for what error message would be right.)
>
> No, actually, it would also make a difference as to whether you  
> recognize
> CSS-style character escapes. And probably affects case-sensitivity  
> as well.
> IMHO mediaqueries should not import CSS character escapes, but  
> should be
> case-insensitive.

I agree that it doesn't make sense to allow escapes. After all, the  
spec are Basic Latin identifiers--not arbitrary strings.

Case-insensitivity would be ASCII case-insensitivity, right? That is,  
"HEIGHT" should count as "height" but "HEÄ°GHT" shouldn't.

Aside: XML 1.0, CSS3 and HTML5 all have different notions of  
whitespace. No fun. I don't want to write extra code to catch the case  
of horizontal tabs appearing in media queries in HTML5. I think I'm  
going to let that one slip by for now, since I think it would be more  
productive to unify CSS and HTML5 notions of whitespace than to write  
code to deal with the difference.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Wednesday, 14 November 2007 16:01:23 UTC