[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 14:18:51 PDT 2012
On Tue, May 15, 2012 at 1:42 PM, Andy Davies <dajdavies at gmail.com> wrote:
> Looking at the srcset proposal it appears to be recreating aspects of
> media-queries in a terse less obvious form...
> <img src="face-600-200 at 1.jpeg" alt=""
> srcset="face-600-200 at 1.jpeg 600w 200h 1x,
> face-600-200 at 2.jpeg 600w 200h 2x,
> face-icon.png 200w 200h">
> We've already got media queries so surelt we should be using them to
> determine which image should be used and if media-queries don't have
> features we need then we should be extending them...
> I'd like to see media-queries extended to support bandwidth, svg etc.,
> then we give developers the option to detected features and choose
> media types appropriately.
The "600w 200h" bit can be directly translated into a media query -
it's equivalent to "(max-width: 600px) and (max-height: 200px)". It's
collapsed into a custom syntax for terseness.
Are there good cases to use other types of media queries? I never got
to join the CG, so I'm sure I missed out on lots of use-cases that
More information about the whatwg