[whatwg] require img dimensions to be correct?
st at isoc.nl
Sat Mar 17 15:05:23 PDT 2007
At 03:46 +1300 UTC, on 2007-03-17, Dean Edridge wrote:
> Regarding: img dimensions to be correct?
> Sander Tekelenburg wrote:
> I don't really think this is a good idea IMHO.
> Firstly, the chance of someone not being able to access the CSS for a web
>page is I'm guessing, pretty slim.
Maybe. I don't have any data to back up either way.
> The chance of someone not being able to access this CSS, and actually
>noticing or caring that the images aren't rendered correctly
The argument is not rendering "correctly", but to avoid "jumpy"
rendering/achieve faster page loading by letting the browser know beforehand
what amount of space to allocate for the image.
> [...] So I don't think it's really worth
>throwing away the benefits of CSS just for a very rare occasion like this
>that would probably not be of benefit to anyone anyway.
I don't see how this throws away CSS benefits. Quite the contrary, as it
disallows specifying width and height in percentages[*] through HTML. I'd
prefer to say that defining width and height in HTML would be illegal, as it
is presentational and should therefore be done through Style Sheets. The only
problem then is that, when CSS is not available, the UA won't know what
amount of space to allocate to the image until it is completely fetched. It's
a (mild) case of CSS-dependancy. The only way I see to avoid that is to
specify a width and height in HTML. And we're talking about pixels only[*],
not percentages which would be purely presentational and thus should be done
through Style Sheets.
Maybe the requirement should in fact be that the image's *actual* width and
height be specifed through HTML.
Btw, remember that the target for the WRI's requirements are "Automated Web
Publishing Systems". It can't be hard for an authoring system to ensure that
the width and height for a particular image is set the same both in HTMl and
CSS. And note that this synchronicity is only required when the image's
height and width is specified in px -- scaling through %/em/ex, a CSS
benefit, is specifically allowed.
 I see it didn't clearly say so at
It does now.
The Web Repair Initiative: <http://webrepair.org/>
More information about the whatwg