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

Re: [whatwg] Features for responsive Web design

From: Mikko Rantalainen <mikko.rantalainen@peda.net>
Date: Wed, 16 May 2012 10:39:35 +0300
Message-ID: <4FB359B7.9080201@peda.net>
To: whatwg@lists.whatwg.org
2012-05-16 10:19 Europe/Helsinki: Tab Atkins Jr.:
> On Wed, May 16, 2012 at 12:14 AM, Mikko Rantalainen
> <mikko.rantalainen@peda.net> wrote:
>> I think that the correct syntax would be
>>
>>    <img src="a-square.png" srcset="a-rectangle.png 2x 600w">
>>
>> because the author assumes that the image will be rendered as 300x150.
> 
> No, the "w" and "h" parameters have no effect on the image's size at
> all.  They're solely used to help pick an image.
> 
> To have the image rendered at 300x150, just *send* a 300x150 image.
> (Or, if the resolution parameter is "2x", send a 600x300 image, etc.)

Okay, I had just misunderstood the relation between "w", "h" and "x"
parameters.

So we have following (if I've understood correctly):

"w": minimum viewport width in CSS pixels for this image
"h": minimum viewport width in CSS pixels for this image
"x": the scaling value from CSS pixels to image data pixels

I think that's fine. Perhaps allow "ppi" or "dpi" instead of x, too?

-- 
Mikko
Received on Wednesday, 16 May 2012 07:40:20 GMT

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