Re: [css3-flexbox] Bad result in flex algorithm when combining stretch, and elements with an aspect ratio

On 12/04/2012 01:03 AM, Kang-Hao (Kenny) Lu wrote:
>
>    # If the flex basis and cross size are both ‘auto’ , the flex
>    # container is single-line and has a definite cross size, the flex
>    # item has an intrinsic aspect ratio, and the flex item has
>    # ‘align-self: stretch’, the flex base size is computed from the
>    # flex container's inner cross size and the flex item's intrinsic
>    # aspect ratio.
>
> Is it intentional that the flex base size computation here ignores
> min/max constraint (say, 'min/max-height') on the flex item with
> intrinsic aspect ratio? Say, something like this
>
>    <flex height=100>
>      <img max-height=50 />
>    </flex>
>
> (Note that this is different from another question of mine which has to
> do with the flexing algorithm.)

You're right. We added that the container's inner cross size should be
clamped to the item's min/max cross size before it's used to compute
the flex base size.

   # If the flex basis and cross size are both ‘auto’ , the flex
   # container is single-line and has a definite cross size, the flex
   # item has an intrinsic aspect ratio, and the flex item has
   # ‘align-self: stretch’, the flex base size is computed from the
   # flex container's inner cross size (clamped to the flex item's
   # min and max cross size) and the flex item's intrinsic aspect
   # ratio.

Please let us know if this looks correct yet. :)

~fantasai

Received on Tuesday, 5 February 2013 06:42:43 UTC