W3C home > Mailing lists > Public > www-style@w3.org > December 2012

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 3 Dec 2012 14:01:56 -0800
Message-ID: <CAAWBYDAhJmBKbZwG34i9LLTNPE6eg3b+_G2FcuBohND7dZ4XvQ@mail.gmail.com>
To: "Kang-Hao (Kenny) Lu" <kanghaol@oupeng.com>
Cc: www-style list <www-style@w3.org>
On Thu, Nov 1, 2012 at 11:51 PM, Kang-Hao (Kenny) Lu
<kanghaol@oupeng.com> wrote:
> (12/11/01 21:27), Tab Atkins Jr. wrote:
>> So, based on feedback in this thread, here's my modified suggestion:
>> 1. In step 3, add a step that, if the available cross size is
>> definite, and an item has both an intrinsic aspect ratio and
>> 'align-self:stretch', goes ahead and sets the hypothetical cross size
>> of the item to the available cross size, and the hypothetical main
>> size according to its aspect ratio.
> It's a bit difficult to make further comments on this without explicit
> wording. For example, I am not sure this substep gets triggered or not if:
>   1. The flex container is a multi-line one.
>   2. When the item has a definite cross size, which is suppose to make
>      'align-self: stretch' not effective.
>   3. When the item has a definite flex basis.

The text should be clear now.  (1) does not trigger it (we require
single-line), (2) does not trigger it (we require both dimensions to
be auto), and neither does (3) (same reason).

> But in any case, setting the hypothetical cross size doesn't seem to be
> necessary.

Yes.  The text I have now invokes the cross size, but only in the
context of defining the hypothetical main size.  We don't actually set
a hypothetical cross size.

>> 2. Modify step 9 (handling "stretch" alignment) to have an explicit
>> statement about handling aspect-ratio items, to clarify that it
>> changes the cross-size *while ignoring the aspect ratio*, so the main
>> size doesn't change.
> I don't know if it's a good idea or not to also mention that "clamped
> according to the item's min and max cross size properties" doesn't
> trigger the min/max violation table in CSS 2.1 10.4.

As far as we can tell, this change wasn't needed anyway.  We just have
a note that the main size has already been set and thus won't be
changed by us adjusting the cross size.

Received on Monday, 3 December 2012 22:02:47 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:22 UTC