[CSS21] [css3-page] page-break collapsing

At TPAC we resolved to clarify CSS2.1 to say that the 'page-break-before' and
'page-break-after' properties don't create a break if you're at the top of the
page, where at the top of the page means no content has been placed, with
borders not counting as content but empty zero-height blocks counting as content.
Here's my proposed text:

Section 13.3.3 Allowed Page Breaks

   # In the normal flow, page breaks can occur at the following places:
   # 1. In the vertical margin between block-level boxes. [...]

This, interpreted strictly, indicates that a break is allowed between siblings,
but not between a parent and its first or last child. Let's clarify that by
inserting "sibling" after "between".

   # Rule A: Breaking at (1) is allowed only if the 'page-break-after' and
   # 'page-break-before' properties of all the elements generating boxes that
   # meet at this margin allow it, which is when at least one of them has the
   # value 'always', 'left', or 'right', or when all of them are 'auto'.

The phrase "meet at this margin" is ill-defined, so we need to define it:

   | A box meets at this margin if it is one of the block-level siblings on
   | either side of the margin or if it is a block-level last (for boxes
   | before the margin) or first (for boxes after the margin) child of a box
   | that also meets at this margin.

We should also add

   | For boxes before the margin, the 'page-break-after' value is considered;
   | for boxes after the margin the 'page-break-before' value is considered.

I think that should get us the behavior we want with the minimal amount of
changes to CSS2.1 and CSS3 Paged Media. For CSS Fragmentation, we can consider
rewriting the section to describe the behavior in the terms Steve used.


Received on Tuesday, 29 November 2011 19:05:33 UTC