W3C home > Mailing lists > Public > www-style@w3.org > February 2013

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 04 Feb 2013 22:42:00 -0800
Message-ID: <5110A9B8.7010503@inkedblade.net>
To: "Kang-Hao (Kenny) Lu" <kanghaol@oupeng.com>
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>, Rossen Atanassov <Rossen.Atanassov@microsoft.com>, Alex Mogilevsky <alexmog@microsoft.com>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:05 GMT