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

On Mon, 26 Apr 2010 23:08:24 +0900, Sylvain Galineau  
<sylvaing@microsoft.com> wrote:
>> From: Anne van Kesteren [mailto:annevk@opera.com]
>> Right. I'm saying that a CSS3 draft for @media could change it.
>
> Is there one ? Are we planning on one ? In the meantime, we
> agree that @media {} is invalid, yes ?

Not sure. Maybe (some want it). Yes. :-)


>> If you have suggestions for how to clarify it that would help. To me
>> it's perfectly clear.
>
> :) I'm glad it's clear to you because existing implementations - 3 of  
> them - are not exactly helpful on this specific aspect. So either  
> they're all
> sloppy or this may not be as clear as it seems.

Or everything recently changed, as happens to be the case. But probably  
some shade of grey :-)


> I'd be happy to suggest
> changes once I understand what it's supposed to, especially on the OM
> front.

Ok.


>> I would like to get full interoperability here, but I think that would
>> require moving the MediaList API in the Media Queries specification and
>> make it into one model. Or alternatively provide more hooks or
>> something
>> in the Media Query specification for the API, but I believe neither is
>> really desired by the WG as we want to move Media Queries forward.
>
> Which spec the answer goes to is an orthogonal issue to what the interop
> runtime behavior is intended to be. I'm really asking about the latter.
>
> This being said, if this is spread across two documents at different
> stages then this means that there will be 2+ set of testcases
> for MQ and we will not know whether two browsers interop without running
> them both (or all three of them if one includes HTML5's media attribute).
> That's unfortunate. I want MQ to move forward too, but if that means
> punting on OM interop issues then it's worth asking if that's the proper
> trade-off.
>
> More recent modules - Transitions, Transforms and Animations - include  
> the relevant OM bits. MediaList seems to be a stand-alone interface so  
> it could fit within this pattern as well.

I am not opposed to merging the CSSOM part of media queries with the Media  
Queries specification.


> OK, my bad. So media="" is invalid but the absence of the media  
> attribute means
> media="all". That one makes sense and seems consistent with no @media
> implying @media all {...} and @media {...} being invalid.

Well, media="" also means media="all", as far as implementations go. It's  
just that authors are not allowed to write it.


>> I suppose. I'm open to suggestions and some help in getting it changed
>> in all implementations.
>
> Given the correction above, I don't think it's too bad. Setting media=""  
> results in an invalid query so the content of the style element no  
> longer applies. Removing the media attribute is equivalent to setting it  
> to "all". There is no real equivalent in CSSOM i.e. something that  
> removes an @media {...} but I think that's OK.

Ok.


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

Received on Tuesday, 27 April 2010 07:08:23 UTC