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: Anselm Hannemann Web Development <info@anselm-hannemann.com>
Date: Wed, 16 May 2012 00:11:20 +0200
Message-Id: <134F2E0A-13C3-475A-A8E3-E7F6D9D9CD56@anselm-hannemann.com>
To: Tab Atkins Jr. <jackalmage@gmail.com>
Cc: whatwg@lists.whatwg.org, Andy Davies <dajdavies@gmail.com>, Bruce Lawson <brucel@opera.com>
Tab, maybe you think this is a good type to write the syntax but the majority of normal web developers are used to use common HTML syntax. This is why we proposed the picture element and normal attributes using media queries.
Of course this means we have lot more to write but at least this is intuitive and totally clear as it uses common structure of HTML. Do you agree with this?
I think it is more important that everyone understands the syntax and actually will use it instead of having a shorthand code that no one will use...?

-Anselm

Am 15.05.2012 um 23:56 schrieb Tab Atkins Jr.:

> 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 22:12:05 GMT

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