[whatwg] Features for responsive Web design
Mikko Rantalainen
mikko.rantalainen at peda.net
Wed May 16 00:39:35 PDT 2012
2012-05-16 10:19 Europe/Helsinki: Tab Atkins Jr.:
> On Wed, May 16, 2012 at 12:14 AM, Mikko Rantalainen
> <mikko.rantalainen at 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
More information about the whatwg
mailing list