2.1.87 [CSS-Level2-2009] Section 13.3.3, Allowed page breaks
V0135:
-
These breaks are subject to the following rules: 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'. Rule B: However, if all of them are 'auto' and a common ancestor of all the elements has a 'page-break-inside' value of 'avoid', then breaking here is not allowed. Rule C: Breaking at (2) is allowed only if the number of line boxes between the break and the start of the enclosing block box is the value of 'orphans' or more, and the number of line boxes between the break and the end of the box is the value of 'widows' or more. Rule D: In addition, breaking at (2) or (3) is allowed only if the 'page-break- inside' property of the element and all its ancestors is 'auto'.
Quirks Mode and IE7 Mode (All Versions)
The following variations apply:
Page breaks are allowed after elements even with page-break-after set to
avoid
; page breaks are allowed before elements even with page-break-before set toavoid
.Page breaks are not made in the vertical margins if the ancestor has page-break-inside set to
avoid
.Rule C is not supported. Page-breaking occurs irrespective of the number of line boxes between the break on the condition that the start of the enclosing block box is the value of
orphans
or greater, and that the number of line boxes between the break and the end of the box is the value ofwidows
or greater.Page breaks occur even if an element or ancestor has page-break-inside set to
avoid
.
IE8 Mode and IE9 Mode (All Versions)
Page breaks are made in the vertical margins if ancestor has page-break-inside set to
avoid
.
V0136:
-
If the above does not provide enough break points to keep content from overflowing the page boxes, then rules A, B and D are dropped in order to find additional breakpoints. If that still does not lead to sufficient break points, rule C is dropped as well, to find still more break points.
Quirks Mode and IE7 Mode (All Versions)
Rule D is dropped. Page breaks occur within blocks when there aren’t enough break points to keep content from overflowing the page boxes.