Title: CSS Fragmentation Module Level 3
Status: ED
Work Status: Exploring
ED: https://drafts.csswg.org/css-break-4/
Shortname: css-break
Group: csswg
Level: 4
TR: https://www.w3.org/TR/css-break-4/
Editor: Rossen Atanassov, Microsoft, ratan@microsoft.com, w3cid 49885
Editor: Elika J. Etemad / fantasai, Invited Expert, http://fantasai.inkedblade.net/contact, w3cid 35400
Abstract:  This module describes the fragmentation model that partitions a flow  into pages, columns, or regions.
Abstract:  It builds on the Page model module and introduces and defines the fragmentation model.
Abstract:  It adds functionality for pagination, breaking variable fragment size and orientation, widows and orphans.
Ignored Terms: background positioning area, region chain, … message topic …, reference box
At Risk: the ''region'' and ''break-after/avoid-region'' values of 'break-*'

CSS Fragmentation Module Level 4
Breaking the Web, one fragment at a time

Introduction

This section is not normative. In paged media (e.g., paper, transparencies, photo album pages, pages displayed on computer screens as printed output simulations), as opposed to continuous media, the content of the document is split into one or more discrete display surfaces. In order to avoid awkward breaks (such as halfway through a line of text), the layout engine must be able to shift around content that would fall across the page break. This process is called pagination. In CSS, in addition to paged media, certain layout features such as regions [[CSS3-REGIONS]] and multi-column layout [[CSS-MULTICOL-1]] create a similarly fragmented environment. The generic term for breaking content across containers is fragmentation. This module explains how content breaks across fragmentation containers (fragmentainers) such as pages and columns and how such breaks can be controlled by the author. ISSUE: This is currently a diff spec. See CSS Fragmentation Level 3 for the rest of the specification. (That text will eventually be folded into this document.)

Adjoining Margins at Breaks: the 'margin-break' property

	Name: margin-break
	Value: auto | keep | discard
	Initial: auto
	Inherited: no
	Applies to: all elements
	Computed Value: specified keyword
	Animation type: discrete
	
Controls whether the box’s block-axis margins are discarded or kept at a fragmentation break. Values have the following meanings:
auto
When an unforced break occurs before or after the box, any margins adjoining the break truncate to the remaining fragmentainer extent before the break, and are truncated to zero after the break. When a forced break occurs there, adjoining margins before the break are truncated, but margins after the break are preserved. Cloned margins are always truncated to zero. Note: When margins collapse (see CSS2§8.3.1), the margins of multiple boxes can be adjoining the break.
keep
Margins adjoining a fragmentation break are not truncated.
discard
Margins adjoining a fragmentation break are always truncated, including at the start and end of a fragmentation context.
ISSUE: Antenna House also allows a second ''keep'' keyword, which preserves the margin after the break; it is otherwise discarded. Do we want to include this feature? Also, if only one ''keep'' is specified, does it apply only to the before margin or both sides? See discussion.
Consider the following multi-column layout example: <style> article { columns: 16ch; border: solid silver; } h3 { break-before: always; } </style> <article> <p>Here we can compare the effects of <code>margin-break</code>, before and after forced and unforced breaks.</p> <p>This paragraph starts after an unforced break.</p> <h3>This heading is given a forced break before.</h3> </article> Here are illustrations of how it might render with each 'margin-break' value:
Here the top margin is kept on the first paragraph and the heading
			          (which starts after a forced break)
			          but not after the second paragraph
			          (which starts after an unforced break).
			          The bottom margins are all discarded
			          at the bottom of each column.
''margin-break: auto'' (initial value)
Here the top margins occurring at the top of each column
			          and the bottom margins occurring at the bottom of each column
			          are all truncated to zero.
''margin-break: discard''
Here the top margins occurring at the top of each column
			          are all kept; however the bottom margins are still truncated.
''margin-break: keep discard''
Here the top margins occurring at the top of each column
			          as well as the bottom margins occurng at the bottom of each column
			          are all kept; this increases the height of the auto-height container
			          to accommodate the bottom margins.
''margin-break: keep keep''

Changes

Changes Since Level 3

The following features have been added since CSS Fragmentation Level 3:

Acknowledgments

The editors would like to thank Murakami Shinyu specifically for his contributions to CSS Fragmentation Level 4, and to all the contributors to Level 3, which constitutes the bulk of this specification.