Re: [css-regions][css-flexbox] Interaction between flexboxes and regions

On Mon, Jun 17, 2013 at 3:33 PM, Alan Stearns <stearns@adobe.com> wrote:
> On 6/17/13 1:46 AM, "Catalin Badea" <badea@adobe.com> wrote:
>>Hello all,
>>I would like to point out some issues between flexbox containers and
>>regions with auto-height. The interaction between the two elements is not
>>covered in detail in the specs [1][2]. CSS Regions fragments' height
>>resolution is a two phase process which is not taken into account when
>>laying out flexboxes with regions children. Also, there is no clear
>>specifications whether the size constraint imposed by a flex container
>>has priority or not in the thread flowing algorithm.
>
> Thanks for bringing this up. My first thought is that the regions
> processing model should merely be an input to the flex layout algorithm.
> So when flex asks for a region height, we run through the entire
> processing model to get an answer, without reference to the flex layout
> algorithm.

I haven't stepped through the precise details, but I did just glance
through the region layout algorithm, and I'm pretty sure this is
right.  The region layout algorithm provides a stable min/max-width
regardless of how the regions break, and initially does layout with
the "region flow content box" being 0 height.  After flex layout is
finished, the RFCB takes up whatever space is left in the actual
element, without modifying the height in any way, and the content is
flowed in.

This should mean that Flexbox layout with Regions is stable and easy
to compute, though it may not give the best results if you're relying
on a lot of auto-sizing.

~TJ

Received on Tuesday, 18 June 2013 06:41:02 UTC