On Wed, 06 Aug 2008 22:06:33 +0200, Ian Hickson <[EMAIL PROTECTED]> wrote:

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.

I don't think this is any more abuse of <img> than e.g. "A group of images that form a single larger picture" or "An image not intended for the user".


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.

"A group of images that form a single larger picture" would also lose the meaning if you just copied the image, or if you lost the context.


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.

Validators can still issue warnings to help with aspect ratio mistakes without putting up a road block for authors trying to migrate to HTML5.

--
Simon Pieters
Opera Software

Reply via email to