W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2008

[whatwg] <img> element comments

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 6 Aug 2008 20:06:33 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0808062002580.5136@hixie.dreamhostps.com>
On Wed, 30 Jul 2008, Matthew Paul Thomas wrote:
> >
> > I'm not sure that this usage of <img> is one that the spec today 
> > considers valid. Wouldn't <canvas> be the better way to do this?
>
> Indeed it wouldn't, because <canvas> wouldn't work in w3m at all!

Yeah, you're right, <canvas> wouldn't work particularly well for this.

<meter> is probably the right element for this. You can use fallback 
content in the <meter> element to show text in legacy browsers that don't 
support HTML5.


> And it seems a little excessive to need to construct a <canvas> when all 
> we want to do is stretch an image horizontally.

What you want to do is show a graph, not stretch an image. The image is 
just the way you've found to do it. However, I don't think it's a valid 
solution. You're saying that the meaning of the image is affected by the 
dimensions at which it is drawn, which seems very dubious since it means 
you would lose the meaning if you just copied the image, or if you lost 
the context (the width only means something relative to other widths), 
etc.


> So to reiterate Henri's point, given that browsers (I assume) have to 
> obey disproportionate width= and height= attributes for compatibility 
> with the Web anyway, I don't see the point of requiring authors to make 
> them match the image's proportions.

The point is to catch errors (aspect ratio mistakes) when authors are 
using HTML in a more appropriate manner.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 6 August 2008 13:06:33 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:04 UTC