Re: [css3-flexbox] make 'visibility: collpase' items more stable for multi-line flex container

On 07/04/2012 09:02 AM, Kang-Hao (Kenny) Lu wrote:
>    # 9. Collapse ‘visibility:collapse’ items. If any flex items have
>    #   ‘visibility: collapse’, note the cross size of the line they're
>    #     in as the item's strut size, and restart layout from the
>    #     beginning.
>
> I am not sure why this need to go back to the beginning, why can't we
> just make collapsed + uncollapsed items fixed in any flex line. That is,
> just jump to right after
>
>    # 5. Resolve the flexible lengths of all the flex items to find their
>    #    used main size, and determine their hypothetical cross size from
>    #    this main size.
>
> ?

There are cases where you don't want to rewrap and cases where you do.
I think it's more likely that the trade off of stability vs. space saving
makes it worth redoing line wrapping. (Remember this is specced mainly
for UI, where space is at a premium, and redoing line layout allows you
to drop empty lines.)

I suspect the cases where you have multiple lines of flexbox and don't
want to rewrap are more likely to be cases of multiple flexboxes than a
case of multiline flexbox.

We considered both options in Hamburg, and concluded that if we were going
to pick one, redoing line layout was probably more desired. And that's why
it goes back to the beginning.

Does this address your question?

~fantasai

Received on Thursday, 5 July 2012 02:52:35 UTC