Re: [css regions] Region "balancing"

On Oct 13, 2011, at 1:12 PM, Alan Stearns wrote:

> I've thought about this, too. But I'm not sure that balancing fits into the
> regions model. In your example it sounds like what you're asking for is to
> balance the last two regions only, and leave the regions in previous pages
> alone. So we'd need a way of specifying a subset of regions to balance
> across. I'm assuming that this subset would need to be contiguous in the
> region chain, and perhaps have to be the last set of regions in the chain.
> But what if the named flow is an entire book that's broken up into chapters,
> and what you want balanced are the two regions on the last page of each
> chapter?
> 

I don't think it's any different from columns. The rules are more or less the same, although admittedly balancing is woefully underspecified for columns (especially in nested pagination models) as well, but I don't think the rules are any different from columns.

> I'm not sure what balancing means in the general regions case. There may be
> regions with different heights or widths where it's just not possible to
> distribute content evenly between regions.

Balancing is a heuristic. You do as well as you can.

We can't assume we know the precise extent of the content that goes into regions, and we can't assume a model where all regions have to be explicitly defined. We need implicit region creation (right now tentatively through @page { grid-template: …. }) and coupled with implicit region creation, you need to do the right thing with content that doesn't fill regions on pages. Otherwise regions will only be good for rigid layouts where you know the exact extent of the content down to the pixel.

Just as an example, I expect the user when reading to be able to increase the font size and still have the layout make sense. When this happens, you'll potentially need more pages to accommodate the increased content size. You'll want balancing rules during layout that are similar to multi-column if you don't fill a page.

I think ultimately it's the wrong model to design only for a fixed set of regions that content will flow through. Without implicit region creation coupled with features like smart balancing, i.e., some of the best features of printing and multi-column, you're constraining yourself to a model that is designed only for "pixel perfect" layouts, where you have placed everything precisely and have no intention of allowing any of it to change. That seems too limiting to me.

dave
(hyatt@apple.com)

Received on Thursday, 13 October 2011 19:18:22 UTC