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

Re: [whatwg] Problems with width/height descriptors in srcset

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 17 May 2012 10:48:47 -0700
Message-ID: <CAAWBYDBsemqkxyY4sK3XWiCcCafTomHr5-td7w3GhjBYWW=ajA@mail.gmail.com>
To: Jeremy Keith <jeremy@adactio.com>
Cc: whatwg@lists.whatwg.org
On Thu, May 17, 2012 at 10:27 AM, Jeremy Keith <jeremy@adactio.com> wrote:
> Tab wrote:
>> Absolutely agreed.  Like several others have suggested, I think we
>> should just go with a "min-width:100px" approach, which is much
>> clearer.  It also lets us add "max-width", though that may complicate
>> the resource choosing algorithm a bit.
> Just to be clear, do you mean changing the syntax so that Nw is replaced with min-width:N?
> e.g.
> <img src="small.png" srcset="medium.png min-width:600px, large.png min-width: 800px">
> or
> <img src="large.png" srcset="medium.png max-width:800px, small.png max-width: 600px">

Yes, you got it.

> Those two examples would then be functionally equivalent (give or take a single pixel) but allow developers to take a "Mobile First" or "Desktop First" approach according to their preference.
> Related question: do we still want to keep this unit-less i.e. ditch the "px" from the examples above? Or, if we're going to use this CSS-like syntax anyway, allow other units of measurement (e.g. ems).

No, if we're aping the CSS syntax more closely, we should just use CSS units.

Received on Thursday, 17 May 2012 17:49:55 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:13 UTC