Re: [css4-images] specifying intrinsic size for images that haven't loaded yet

On 29/07/2012 2:22 PM, L. David Baron wrote:

> describes a use
> case that we should try to address; specifying an *intrinsic size*
> for images that aren't loaded yet so that pages don't bounce around
> when images load.  This is doable today if you want the images to be
> sized to their intrinsic size, but it's not doable today if you want
> to scale the images but preserve the intrinsic ratio (for example,
> by making them the width of their container).

I believe this is what the value 'fill' does with the property 
'object-fit' by this algorithm (see point two for 'specified size') [2].

> (I was trying to figure out if this was a feature provided by the
> confusing magical behavior of object-fit:contain on sizing that was
> in previous drafts of css3-images [1] but which we removed at least
> partly because it was confusing, but I don't think it is, since I
> think that magical behavior still only works if the images are
> loaded.)

I don't think it was confusing. It's just took some time for Tab to 
understand that an author can create a SVG that has no intrinsic 
dimension nor intrinsic ratio. The dilemma was only with SVGs.

> Would it make sense to have an 'intrinsic-size' property?  (If we
> do, would we want it to override data from the image, or vice
> versa?)
> -David
> [1] first paragraph of the 'contain' definition in

Again, I believe this is what the value 'fill' does with the property 


Alan Gresley

Received on Sunday, 29 July 2012 05:08:46 UTC