[whatwg] Features for responsive Web design
Smylers at stripey.com
Sat Sep 8 02:18:40 PDT 2012
Fred Andrews writes:
> From: mjs at apple.com
> > > <img style="width: 10em" src="image-320x200.jpg"
> > > set="image-320x200.jpg 320 200 10k, image-640x400.jpg 640 400 40k,
> > > image-1280x800.jpg 1280 800 150k">
> > The layout size of that <img> element is not computable until all
> > external stylesheets have loaded, as you have written it.
> Actually, the image width is '10em' in this example, without having to
> load any style sheets!
And how big is 10em? 1em is dependent on the font-size of the parent
element of the <img>, which may be set by an external style-sheet.
> The browser can immediately determine the image to use and load it in
> this particular case.
You see how easy it would be for authors to get this wrong, even if they
knew they had to put image sizes in-line in order to have good
performance and tried to do that. That you, the promoter of the feature,
can't even get it right suggests that it would also be hard for authors
to do so.
New series of TV puzzle show 'Only Connect' (some questions by me)
Mondays at 20:30 on BBC4, or iPlayer: http://www.bbc.co.uk/onlyconnect
More information about the whatwg