Re: Image intrinsic aspect ratio and replaced element box aspect ratio

Ian Hickson wrote:
> On Wed, 10 Oct 2007, Henri Sivonen wrote:
>> http://www.w3.org/html/wg/html5/#height
>>> If both attributes are specified, then the ratio of the specified width to
>>> the specified height must be the same as the ratio of the logical width to
>>> the logical height in the image file.
>> Why is this requirement useful? As far as I can tell, it isn't required 
>> for interop and makes an interoperably implemented feature 
>> non-conforming for no good reason.
> 
> Having the validator point out when an image is being stretch to unnatural 
> dimensions is helpful.

Sure, it might be helpful if the authors intention is to maintain the 
aspect ratio.  But if, for any reason, the author wants to stretch the 
image, then this makes the document unnecessarily non-conforming.  One 
use case for doing this is for making a simple bar graph by stretching a 
1px wide image to an appropriate width to represent a value.  Although 
the <meter> element largely replaces this practice, authors currently do 
it and they may wish to provide such an image as fallback for when the 
<meter> element isn't supported.

>> Moreover, it makes the conformance of the markup document dependent on 
>> external resource representations, which complicates things a lot and 
>> makes markup conformance a concept that you can't observe from the 
>> markup itself alone.
> 
> There are many problems that can affect an author, they're not limited to 
> just the content of the page. The conformance of the CSS files, the JS 
> files, the PNG files, the conformance of all the HTTP headers, the 
> relationships between those various element, etc. I'd expect a validator 
> to check all these things. :-)

Having a tool that checks the conformance of many individual resources 
like that might be useful, but making the conformance of one contingent 
on another like that doesn't seem too sensible to me.

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/

Received on Friday, 1 August 2008 14:10:59 UTC