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:56:43 -0700
Message-ID: <CAAWBYDD20kVjce=rSbPXdUq9wpK6XG1Ryc9GYKCd5FnkXuD20g@mail.gmail.com>
To: Bruce Lawson <brucel@opera.com>
Cc: whatwg@lists.whatwg.org, Andy Davies <dajdavies@gmail.com>
On Tue, May 15, 2012 at 2:46 PM, Bruce Lawson <brucel@opera.com> wrote:
> 1) the 600w 200h bit replicates the functionality of the familiar Media
> Queries syntax but in a new unfamiliar microsyntax which many have argued is
> ugly, unintuitive and prone to error
> (http://www.w3.org/community/respimg/2012/05/11/respimg-proposal)
[snip]
> I'm sympathetic to (2); why require a developer to think of and describe
> every permutation if the environment, when she could instead describe that
> which she knows - the images - and then allow the UA to take the decision.
> As time goes on, UAs get cleverer, so behaviour improves without the markup
> needing changing.
>
> But it doesn't seem necessary to saddle authors with (1) to acheive (2), as
> far as I can see.

I think I more or less agree with you.  However, when you look at MQ,
literally the only things you want to decide on are width/height, and
*maybe* grayscale/color. You really don't need to be generic here, so
you might as well optimize the syntax to make it easier to type.

I think this is too much, personally.  I'd prefer more verbosity here, like:

<img src=foo.jpg srcset="foo-big.jpg min-width:1000px, foo-big@2.jpg
min-width:1000px 2x">

Importantly, I think I'd like to be able to use either min or max, but
@srcset's microsyntax only talks about min sizes. (I got it wrong in
my previous email.)

~TJ
Received on Tuesday, 15 May 2012 21:57:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT