W3C home > Mailing lists > Public > www-style@w3.org > March 2011

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 22 Mar 2011 16:13:11 -0700
Message-ID: <AANLkTi=mOKByKx9WCk9zVocnwkw7RJimoLRdG-+SVfH9@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: "www-style@w3.org" <www-style@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:38 GMT