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

Re: [cssom-view] addMediumListener / removeMediumListener

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 26 May 2010 16:13:05 +0200
To: "Luiz Agostini" <luiz.agostini@openbossa.org>
Cc: www-style@w3.org, marcosc@opera.com
Message-ID: <op.vdbgf30y64w2qv@annevk-t60>
On Wed, 26 May 2010 16:07:06 +0200, Luiz Agostini  
<luiz.agostini@openbossa.org> wrote:
> Is there any compelling reasons to not accept media query lists?

I mainly did it for consistency with matchMedium() which in turn was based  
on appendMedium() and all.


> A useful notification may be related to a list and not to a specific  
> query.
> For example I could have
>
> @media (min-width: 300px), (orientation:landscape) {
>     body {background-color: red}
> }
>
> and be interested on receiving a callback when the background color of  
> the body changes. It is of course possible to make it just having  
> callbacks to each query but having a callback to the list would make it  
> somewhat easier.
>
> On a side note, the matchMedium implementation in WebKit accepts media  
> query lists, is that to be considered a bug?

I guess it makes sense if they both accept lists of media queries, but  
then the name is somewhat wrong and out of line with appendMedium().  
(Though we could change that one too.)


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Wednesday, 26 May 2010 14:13:51 GMT

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