Re: [CSS21] Issue 283 - undefining size of replaced elements with intrinsic ratio only

On Tue, Mar 22, 2011 at 3:24 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
> Proposal:
>
> In 10.3.2
>  # If 'height' and 'width' both have computed values of 'auto' and the
> element
>  # has an intrinsic ratio but no intrinsic height or width and the
> containing
>  # block's width does not itself depend on the replaced element's width,
> then
>  # the used value of 'width' is calculated from the constraint equation used
>  # for block-level, non-replaced elements in normal flow.
>
> Replace "is calculated" with
>  | is undefined. However it is suggested that it be calculated.

This describes the behavior of Opera and FF, but Chrome and IE instead
just default to the standard 300x150 rectangle.  (Well, Chrome does
for <object>.  For <img> it does something crazier, where it
calculates both the width *and* the height to fill available space.)

I prefer the Chrome/IE behavior, given that we're calculating the size
of an inline replaced element.  I wouldn't want it to act like a block
by default and get all huge, automatically dropping down to the next
line of text.


> In 10.6.2
>  # Otherwise, if 'height' has a computed value of 'auto', and the element
> has
>  # an intrinsic ratio then the used value of 'height' is: (used width) /
> (intrinsic ratio)
>
> Replace "is: (used width) / (intrinsic ratio)" with
>  | is undefined. However it is suggested that it be calculated from the used
>  | width and intrinsic ratio so that the aspect ratio is preserved.

No browser uses the aspect ratio of the contents to calculate the size
of the replaced element.  I don't think we should spec this.

~TJ

Received on Tuesday, 22 March 2011 23:14:02 UTC