[whatwg] So if media-queries aren't for determining the media to be used what are they for?

Tab Atkins Jr. jackalmage at gmail.com
Tue May 15 16:46:53 PDT 2012


On Tue, May 15, 2012 at 4:23 PM, Jeremy Keith <jeremy at adactio.com> wrote:
> Odin wrote:
>> 1. How do we enable authors so that they can display different images under different conditions based on art direction?
>
>> 2. Enabling authors to provide different resolutions of images based on a variety of conditions.
>
> The srcset proposal that has been thrown into the spec looks like a good answer for that second use-case but it doesn't attempt to tackle the first use-case.
>
> Now ideally we'd find one solution that solves both use-cases but after the discussion here and in IRC I think that's looking increasingly unlikely.

Hm, I'm confused.  The "NNNw" and "NNNh" parts of the microsyntax are
precisely intending to solve the (1) case.  They're more-or-less
equivalent to using min-width and min-height Media Queries.

Looking through the list of Media Queries, it seems that the only
useful ones for art-direction style changes are the width/height ones,
and maybe the monochrome or color ones.  We can always add the latter
to the microsyntax if necessary (their syntax in MQ is pretty weird).

I'm not aware of any plans for future MQs that would be very useful here either.

~TJ



More information about the whatwg mailing list