Bug 15448 - page-break-* shouldn't create a break if you're at the top of the page
page-break-* shouldn't create a break if you're at the top of the page
Status: NEW
Product: CSS
Classification: Unclassified
Component: CSS Level 2
unspecified
All Windows 3.1
: P2 normal
: ---
Assigned To: Bert Bos
public-css-bugzilla
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-07 08:21 UTC by Anton P
Modified: 2012-12-04 00:52 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton P 2012-01-07 08:21:20 UTC
Reported by fantasai

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.

Conversation begins:
Bug description:
http://lists.w3.org/Archives/Public/www-style/2011Nov/0736.html
Comment 1 Anton P 2012-01-15 18:10:08 UTC
TPAC minutes: http://lists.w3.org/Archives/Public/www-style/2011Nov/0711.html