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

On Tue, 13 Jul 2010 17:08:55 +0200, L. David Baron <dbaron@dbaron.org>  
wrote:
> On Wednesday 2010-05-12 11:30 +0200, Anne van Kesteren wrote:
>> That seems like a sensible change. So
>>
>>   screen and (foobar), print and (foobar)
>>
>> turns into
>>
>>   not all, not all
>
> Yes.

Ok, for the unknown media features, unknown media feature values, and  
malformed media queries this should now be as clear as we can make it. If  
I'm going to write the next version of Media Queries I will turn it all  
into a single coherent model, including parsing, serializing, the CSSOM,  
etc.


>> Would appendMedium() still "ignore" the call if the parsed media
>> query is ignored, as currently defined? I guess it might make more
>> sense if it appends "not all" in that case.
>
> I think it might -- it would save authors having to check whether it
> actually increased the count as far as dealing with management of
> the list.  But I don't feel strongly.

If parsing returns a single media query that is "not all" and "not all" is  
not in the list it will be appended. If parsing returns multiple media  
queries or if it returns something that is already in the list nothing  
will be appended.


>> When you serialize a
>> list of media queries should it return "all" if the list is empty?
>> Or just the empty string?
>
> I tend to think the empty string is better.

Ok, done.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Wednesday, 14 July 2010 09:48:29 UTC