W3C home > Mailing lists > Public > www-style@w3.org > October 2011

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

From: David Hyatt <hyatt@apple.com>
Date: Tue, 04 Oct 2011 23:37:02 -0500
Message-id: <7B9F598B-1304-4E3C-9565-2EB037ADF1A8@apple.com>
To: "www-style@w3.org list" <www-style@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:45 GMT