break-after

  • Revision slug: Web/CSS/break-after
  • Revision title: break-after
  • Revision id: 494071
  • Created:
  • Creator: kscarfone
  • Is current revision? Yes
  • Comment Updated tags

Revision Content

{{CSSRef}}

Summary

The break-after CSS property describes how the page, column or region break behavior after the generated box. If there is no generated box, the property is ignored.

Each possible break point, that is each element boundary, is under the influence of three properties, the break-after value of the previous element, the {{cssxref("break-before")}} value of the next element and the {{cssxref("break-inside")}} of the containing element.

To define if a break must be done, the following rules are applied:

  1. If any of the three concerned values is a forced break value, that is always, left, right, page, column or region, it has precedence. If several of the concerned values is such a break, the one of the element that appears the latest in the flow is taken (that is the {{cssxref("break-before")}} value has precedence over the break-after value, which itself has precedence over the {{cssxref("break-inside")}} value).
  2. If any of the three concerned values is an avoid break value, that is avoid, avoid-page, avoid-region, avoid-column, no such break will be applied at that point.

Once forced breaks have been applied, soft breaks may be added if needed, but not on element boundaries that resolve in a corresponding avoid value.

{{cssbox("break-after")}}

Syntax

Formal syntax: {{csssyntax("break-after")}}
break-after: auto
break-after: always
break-after: left
break-after: right
break-after: recto
break-after: verso
break-after: page
break-after: column
break-after: region
break-after: avoid
break-after: avoid-page
break-after: avoid-column
break-after: avoid-region

Values

auto
Initial value. Allows, meaning neither forbid nor force, any break (either page, column or region) to be be inserted after the principal box.
always
Always force page breaks after the principal box. This is a synonym of page, it has been kept to facilitate transition from {{cssxref("page-break-after")}} which is subset of this property.
avoid
Prevent any break, either page, column or region, to be inserted right after the principal box.
left
Force one or two page breaks right after the principal box so that the next page is formatted as a left page.
right
Force one or two page breaks right after the principal box so that the next page is formatted as a right page.
page
Always force one page break right after the principal box.
column
Always force one column break right after the principal box.
region {{experimental_inline}}
Always force one region break right after the principal box.
recto {{experimental_inline}}
Force one or two page breaks right after the principal box so that next page is formatted as a recto page, that is a right page in a left-to-right spread or a left page in a right-to-left spread.
verso {{experimental_inline}}
Force one or two page breaks right after the principal box so that next page is formatted as a verso page, that is a left page in a left-to-right spread or a left right in a right-to-left spread.
avoid-page
Avoid any page break right after the principal box.
avoid-column
Avoid any column break right after the principal box.
avoid-region {{experimental_inline}}
Avoid any region break right after the principal box.

Examples

Specifications

Specification Status Comment
{{SpecName('CSS3 Fragmentation', '#break-after', 'break-after')}} {{Spec2('CSS3 Fragmentation')}} Adds the recto and verso keywords. Changes the media type of this property from paged to {{xref_cssvisual}}. Precises the breaking algorithm with different kinds of breaks.
{{SpecName('CSS3 Regions', '#break-after', 'break-after')}} {{Spec2('CSS3 Regions')}} Extends the property to handle region breaks. Adds the avoid-region and region keywords.
{{SpecName('CSS3 Multicol', '#break-after', 'break-after')}} {{Spec2('CSS3 Multicol')}} Initial specification. Extends the CSS 2.1 {{cssxref("page-break-after")}} property to handle both page and column breaks.

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatNo}} [*] {{CompatNo}} 10 11.10 {{CompatNo}} [*]
column, avoid-column {{CompatNo}} [*] {{CompatNo}} 10 11.10 {{CompatNo}} [*]
recto, verso {{experimental_inline}} {{CompatNo}} {{CompatNo}} {{CompatNo}} {{CompatNo}} {{CompatNo}}
region, avoid-region {{experimental_inline}} {{CompatNo}} [*] {{CompatNo}} {{CompatNo}} {{CompatNo}} {{CompatNo}} [*]
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{CompatNo}} [*] {{CompatNo}} {{CompatUnknown}} {{CompatUnknown}} {{CompatNo}} [*]
column, avoid-column {{CompatNo}} [*] {{CompatNo}} {{CompatUnknown}} {{CompatUnknown}} {{CompatNo}} [*]
recto, verso {{experimental_inline}} {{CompatNo}} {{CompatNo}} {{CompatNo}} {{CompatNo}} {{CompatNo}}
region, avoid-region {{experimental_inline}} {{CompatNo}} [*] {{CompatNo}} {{CompatNo}} {{CompatNo}} {{CompatNo}}[*]

[*] WebKit browsers doesn't support this property; but some have the non-standard -webkit-column-break-after and -webkit-region-break-after with similar parameters as {{cssxref("page-break-after")}}.

See also

  • {{CSS_Reference:Columns}}

Revision Source

<div>
 {{CSSRef}}</div>
<h2 id="Summary">Summary</h2>
<p>The <code>break-after</code> <a href="/en-US/docs/CSS">CSS</a> property describes how the page, column or region break behavior after the generated box. If there is no generated box, the property is ignored.</p>
<p>Each possible break point, that is each element boundary, is under the influence of three properties, the <code>break-after</code> value of the previous element, the {{cssxref("break-before")}} value of the next element and the {{cssxref("break-inside")}} of the containing element.</p>
<p>To define if a break must be done, the following rules are applied:</p>
<ol>
 <li>If any of the three concerned values is a <em>forced break value</em>, that is <code>always</code>, <code>left</code>, <code>right</code>, <code>page</code>, <code>column</code> or <code>region</code>, it has precedence. If several of the concerned values is such a break, the one of the element that appears the latest in the flow is taken (that is the {{cssxref("break-before")}} value has precedence over the <code>break-after</code> value, which itself has precedence over the {{cssxref("break-inside")}} value).</li>
 <li>If any of the three concerned values is an <em>avoid break value</em>, that is <code>avoid</code>, <code>avoid-page</code>, <code>avoid-region</code>, <code>avoid-column</code>, no such break will be applied at that point.</li>
</ol>
<p>Once forced breaks have been applied, soft breaks may be added if needed, but not on element boundaries that resolve in a corresponding avoid value.</p>
<p>{{cssbox("break-after")}}</p>
<h2 id="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox">
<a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("break-after")}}
</pre>
<pre>
break-after: auto
break-after: always
break-after: left
break-after: right
break-after: recto
break-after: verso
break-after: page
break-after: column
break-after: region
break-after: avoid
break-after: avoid-page
break-after: avoid-column
break-after: avoid-region
</pre>
<h3 id="Values">Values</h3>
<dl>
 <dt>
  <code>auto</code></dt>
 <dd>
  Initial value. Allows, meaning neither forbid nor force, any break (either page, column or region) to be be inserted after the principal box.</dd>
 <dt>
  <code>always</code></dt>
 <dd>
  Always force page breaks after the principal box. This is a synonym of <code>page</code>, it has been kept to facilitate transition from {{cssxref("page-break-after")}} which is subset of this property.</dd>
 <dt>
  <code>avoid</code></dt>
 <dd>
  Prevent any break, either page, column or region, to be inserted right after the principal box.</dd>
 <dt>
  <code>left</code></dt>
 <dd>
  Force one or two page breaks right after the principal box so that the next page is formatted as a left page.</dd>
 <dt>
  <code>right</code></dt>
 <dd>
  Force one or two page breaks right after the principal box so that the next page is formatted as a right page.</dd>
 <dt>
  <code>page</code></dt>
 <dd>
  Always force one page break right after the principal box.</dd>
 <dt>
  <code>column</code></dt>
 <dd>
  Always force one column break right after the principal box.</dd>
 <dt>
  <code>region </code>{{experimental_inline}}</dt>
 <dd>
  Always force one region break right after the principal box.</dd>
 <dt>
  <code>recto</code> {{experimental_inline}}</dt>
 <dd>
  Force one or two page breaks right after the principal box so that next page is formatted as a recto page, that is a right page in a left-to-right spread or a left page in a right-to-left spread.</dd>
 <dt>
  <code>verso </code>{{experimental_inline}}</dt>
 <dd>
  Force one or two page breaks right after the principal box so that next page is formatted as a verso page, that is a left page in a left-to-right spread or a left right in a right-to-left spread.</dd>
 <dt>
  <code>avoid-page</code></dt>
 <dd>
  Avoid any page break right after the principal box.</dd>
 <dt>
  <code>avoid-column</code></dt>
 <dd>
  Avoid any column break right after the principal box.</dd>
 <dt>
  <code>avoid-region </code>{{experimental_inline}}</dt>
 <dd>
  Avoid any region break right after the principal box.</dd>
</dl>
<h2 id="Examples">Examples</h2>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSS3 Fragmentation', '#break-after', 'break-after')}}</td>
   <td>{{Spec2('CSS3 Fragmentation')}}</td>
   <td>Adds the <code>recto</code> and <code>verso</code> keywords. Changes the media type of this property from <code>paged</code> to {{xref_cssvisual}}. Precises the breaking algorithm with different kinds of breaks.</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS3 Regions', '#break-after', 'break-after')}}</td>
   <td>{{Spec2('CSS3 Regions')}}</td>
   <td>Extends the property to handle region breaks. Adds the <code>avoid-region</code> and <code>region</code> keywords.</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS3 Multicol', '#break-after', 'break-after')}}</td>
   <td>{{Spec2('CSS3 Multicol')}}</td>
   <td>Initial specification. Extends the CSS 2.1 {{cssxref("page-break-after")}} property to handle both page and column breaks.</td>
  </tr>
 </tbody>
</table>
<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2>
<div>
 {{CompatibilityTable}}</div>
<div id="compat-desktop">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Chrome</th>
    <th>Firefox (Gecko)</th>
    <th>Internet Explorer</th>
    <th>Opera</th>
    <th>Safari (WebKit)</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{CompatNo}} [*]</td>
    <td>{{CompatNo}}</td>
    <td>10</td>
    <td>11.10</td>
    <td>{{CompatNo}} [*]</td>
   </tr>
   <tr>
    <td><code>column</code>, <code>avoid-column</code></td>
    <td>{{CompatNo}} [*]</td>
    <td>{{CompatNo}}</td>
    <td>10</td>
    <td>11.10</td>
    <td>{{CompatNo}} [*]</td>
   </tr>
   <tr>
    <td><code>recto</code>, <code>verso</code> {{experimental_inline}}</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}}</td>
   </tr>
   <tr>
    <td><code>region</code>, <code>avoid-region</code> {{experimental_inline}}</td>
    <td>{{CompatNo}} [*]</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}} [*]</td>
   </tr>
  </tbody>
 </table>
</div>
<div id="compat-mobile">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Android</th>
    <th>Firefox Mobile (Gecko)</th>
    <th>IE Phone</th>
    <th>Opera Mobile</th>
    <th>Safari Mobile</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{CompatNo}} [*]</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatUnknown}}</td>
    <td>{{CompatUnknown}}</td>
    <td>{{CompatNo}} [*]</td>
   </tr>
   <tr>
    <td><code>column</code>, <code>avoid-column</code></td>
    <td>{{CompatNo}} [*]</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatUnknown}}</td>
    <td>{{CompatUnknown}}</td>
    <td>{{CompatNo}} [*]</td>
   </tr>
   <tr>
    <td><code>recto</code>, <code>verso </code>{{experimental_inline}}</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}}</td>
   </tr>
   <tr>
    <td><code>region</code>, <code>avoid-region</code> {{experimental_inline}}</td>
    <td>{{CompatNo}} [*]</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}}[*]</td>
   </tr>
  </tbody>
 </table>
</div>
<p>[*] WebKit browsers doesn't support this property; but some have the non-standard <code>-webkit-column-break-after</code> and <code>-webkit-region-break-after</code> with similar parameters as {{cssxref("page-break-after")}}.</p>
<h2 id="See_also">See also</h2>
<ul>
 <li>{{CSS_Reference:Columns}}</li>
</ul>
Revert to this revision