W3C home > Mailing lists > Public > www-style@w3.org > December 2007

[css3-mediaqueries] more on syntax

From: Anne van Kesteren <annevk@opera.com>
Date: Mon, 10 Dec 2007 15:17:13 +0100
To: www-style@w3.org
Message-ID: <op.t24hyzw564w2qv@annevk-t60.oslo.opera.com>

Hi,

I made a few testcases regarding media query syntax:

   http://tc.labs.opera.com/mediaqueries/parsing/
   http://lists.w3.org/Archives/Public/public-css-testsuite/2007Dec/0002.html

They raise a few issues that we have to resolve one way or another. Some  
thoughts:

* It seems good to leave handling of the empty string up to the host  
language. In HTML it makes sense that media="" and media="all" are  
identical. @media { } does not make too much sense in CSS.

* Whitespace needs to be included in the syntax. As for what whitespace  
means we have two options: 1) leave it up to the host language or 2) make  
it identical to CSS whitespace and let host languages define a  
pre-processing step if they so desire.

* It needs to be clear where whitespace is required. I made it required  
between "and" and "(width)" for instance in the tests so they can not be  
confused with CSS function definitions, but maybe this is worth some  
discussion given that implementations disagree.

* We need to define EOF handling. For consistency with CSS it makes sense  
that media="(width  " works. It would even make sense for media="(width   
,blah" in my opinion (basically end-of-media-query handling). The tests  
currently assume the reverse by the way, but that's easily fixed.

You can contribute tests using the format I used in the file to generate  
these tests:

   http://tc.labs.opera.com/mediaqueries/parsing/testdata

Kind regards,


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Monday, 10 December 2007 14:16:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:56 GMT