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

Re: Media Query Variables

From: Bruno Racineux <bruno@hexanet.net>
Date: Wed, 13 Nov 2013 23:09:39 -0800
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: Henrik Andersson <henke@henke37.cjb.net>, Yoav Weiss <yoav@yoav.ws>, Andy Davies <dajdavies@gmail.com>, www-style <www-style@w3.org>
Message-ID: <CEA9ABCB.7AB76%bruno@hexanet.net>

On 11/13/13 10:18 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

>On Wed, Nov 13, 2013 at 8:48 PM, Bruno Racineux <bruno@hexanet.net> wrote:
>> Any possible prospect or technical ability to apply them to classes
>> directly? Such as:
>> .myclass@('small'){
>> }
>Can you elaborate on what you mean by this?

Having a MQ var could have the benefit of declaring "MQ dependent" styles
individually by using a media-var shortcut in a "pseudo" fashion.

So with:

  @media-var 'small' (max-width: 20em);



Becomes the shorter syntax equivalent to:


It would free the need to having to double wrap everything in single large
MQs. And a convenient way to isolate and identify a class attached
specifically to an MQ set and nothing else.

Or rather, think of it as a perhaps more appropriate syntax:


Though the long form becomes much less of a shortcut.
Received on Thursday, 14 November 2013 07:10:08 UTC

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