[CSS3 Regions] Circular logic with "auto" height values for regions

I was beginning to look at how to implement the "auto" height rules described in section 4.2.2, and it seems impossible to implement.

The order content flows into regions is determined by the document order. However, this does not match the order in which engines lay out elements. For example positioned objects require the dimensions of the containing block to be known (including intrinsic sizes) before they can lay out, and therefore they lay out after normal flow objects. There are plenty of other examples of this. My point being that at the time you are trying to figure out the size of a region, you can't know which part of the flow thread is going to fit into it. You just won't have that information yet.

What you can do is return 0, wait until all the regions got an initial layout, and then start trying to put the contents of the flow thread into the regions. When you discover that a region changes size to accommodate the rest of the flow thread, though, you're put in a position where the region's change in size could affect earlier regions that the flow thread uses. This is possible with any number of layouts, including positioning, floats, flex box, grid, etc.

My recommendation is that this feature has to be cut. I can't see any realistic way to implement it. You can't create a circular layout dependency between the regions and the flow contents. They have to be independent.

dave
(hyatt@apple.com)

Received on Wednesday, 5 October 2011 04:37:40 UTC