Re: Media Query Variables

On 11/13/13 8:14 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>
>My current thought is something like:
>
><style>
>@custom-media "small" (max-width: 20em);
>@custom-media "large" (min-width: 40em);
></style>
><link rel=stylesheet media="('small')" >
><link rel=stylesheet media="('small')" >
>
>Note the use of quotes - using strings as the name avoids any possible
>collision with future MQs we define.
>
>Another possibility would be to use a reserved prefix, like Custom
>Properties use.  It seems a little weird to use "var-", but honestly
>it might be easiest to learn like that.

Sounds good to me. Not a fan of media="var(foo)". Unless it's just for the
definition:
@media-var 'small' (max-width: 20em);    saving 3 chars...

Any possible prospect or technical ability to apply them to classes
directly? Such as:

.myclass@('small'){
}

Received on Thursday, 14 November 2013 04:49:04 UTC