W3C home > Mailing lists > Public > www-style@w3.org > July 2010

Re: [css3-mediaqueries][cssom] Empty media queries in stylesheets and the DOM

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 14 Jul 2010 11:43:20 +0200
To: "www-style list" <www-style@w3.org>, "Sylvain Galineau" <sylvaing@microsoft.com>
Message-ID: <op.vftumigx64w2qv@annevk-t60>
On Thu, 15 Apr 2010 02:49:11 +0200, Sylvain Galineau  
<sylvaing@microsoft.com> wrote:
> Section 2 of the specification [1] states:
>
>> A media query consists of a media type and zero or more expressions
>> involving media features. If the media type is omitted it is assumed
>> to be 'all'.
>
> It is unclear whether the second statement means a) that this:
>
>    @media { ... }
>
> ...is equivalent to:
>
>    @media all { ... }
>
> ...or b) whether it only means that:
>
>    @media (orientation:portrait) { ... }
>
> ...is equivalent to:
>
>    @media all and (orientation:portrait) { ... }
>
> ...but that @media { ... } is otherwise invalid.

This should be very clear now. Well, at least more clear :-) I changed the  
editor's draft based on the recommendations of the WG:

   http://www.w3.org/blog/CSS/2010/05/16/resolutions_106
   http://dev.w3.org/csswg/css3-mediaqueries/


> Things get more confusing at the DOM level.
>
> If one specifies an @media all {...} rule and then removes the 'all'  
> medium using MediaList.deleteMedium()[4], Firefox then returns 'not all'  
> for MediaList.mediaText.

I also updated the CSSOM to say that the empty list should be serialized  
as the empty string.


> [1] http://www.w3.org/TR/css3-mediaqueries/#media0
> [4] http://dev.w3.org/csswg/cssom/#dom-medialist-deletemedium


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Wednesday, 14 July 2010 09:44:10 GMT

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