Re: [whatwg] Features for responsive Web design

On May 21, 2012, at 9:37 PM, Kornel Lesiński <kornel@geekhood.net> wrote:

> 
> 
>> There’s no prior precedent this sort of thing—there’s no reason we can’t find a way to preserve an image’s intrinsic width using `picture`. I wonder if simply adding `width` and `height` attributes on the element (similar to `img`) might solve this, in the event that the author wants to rely on an intrinsic size instead of CSS?
> 
> I think that is a very good idea. Having option to do so is good for performance, as it avoids reflows.

If 'width' and 'height' attributes on the <picture> element would do the same thing as they do on <img>, then they would be setting the size via style, rather than setting intrinsic size. Even if setting the size explicitly affected intrinsic size rather than size computed via style, it would miss the point of intrinsic size, which is that images get automatically the right amount of space based on the image itself. Auto-sizing may not be the right choice for all designs, but it is for some designs.

 - Maciej

Received on Tuesday, 22 May 2012 21:02:04 UTC