W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 15 May 2012 14:18:51 -0700
Message-ID: <CAAWBYDDWKGjA_DL4U8rpjYK3MCv0aMPoxe-zpNwM-7LU1uxTkw@mail.gmail.com>
To: Andy Davies <dajdavies@gmail.com>
Cc: whatwg@lists.whatwg.org
On Tue, May 15, 2012 at 1:42 PM, Andy Davies <dajdavies@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
were presented.

Received on Tuesday, 15 May 2012 21:19:42 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:42 UTC