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

Re: [mediaqueries] User-defined Media Queries?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 31 May 2013 11:21:16 -0700
Message-ID: <CAAWBYDB9Mevdm9WLqJAHAgfNfDfJJA0bGwrCikpfES8d8zdZFw@mail.gmail.com>
To: Yehuda Katz <wycats@gmail.com>
Cc: www-style list <www-style@w3.org>
On Fri, May 31, 2013 at 11:17 AM, Yehuda Katz <wycats@gmail.com> wrote:
> What about just:
>
>> <html>
>>   <script>
>>     if (window.outerWidth >= 600)
>>       document.css.media.huge = true;
>>     }
>>   </script>
>>   <style>
>>     @media ("huge") {
>
>>       .facet_sidebar {
>>         display: none;
>>       }
>>     }
>>   </style>
>> </html>

Hmm, using bare strings as the media query name is interesting.  It's
definitely unambiguous and non-colliding, and means that authors can
give whatever they want as the name without having to worry about
escaping.  Plus, nice and short.  +1.

~TJ
Received on Friday, 31 May 2013 18:22:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:30 UTC