Fragmentation

Keep Together

Requests that a bounded content block avoid internal fragmentation using native break-inside behavior.

Elementef-print-keep
CapabilityP0 portable
Maturityimplemented / best-effort
Pagination ownerBrowser / selected renderer

Capability note. Avoidance is not absolute when the block is taller than the available page. Never hide overflow or shrink essential text to force a keep.

Example 1

Callout block

A compact callout is a good candidate for break-inside avoidance.

Open standalone print preview

On narrow screens the embedded example uses a screen-only inspection layout. Printing and the standalone document keep Folio's physical print rules.

View HTML
<ef-print-document>
  <ef-print-keep>
    <div class="folio-callout">
      <h2>Decision</h2>
      <p>Use Chromium page-margin boxes only in the capability tiers where they are actually supported.</p>
    </div>
  </ef-print-keep>
</ef-print-document>
Example 2

Figure and caption

Keep a small figure with its caption when the combined block can fit on one page.

Open standalone print preview

On narrow screens the embedded example uses a screen-only inspection layout. Printing and the standalone document keep Folio's physical print rules.

View HTML
<ef-print-document>
  <ef-print-keep>
    <figure class="folio-figure">
      <div class="folio-figure-box">Architecture diagram</div>
      <figcaption>Figure 1. Application content flows through Folio intent into the selected renderer.</figcaption>
    </figure>
  </ef-print-keep>
</ef-print-document>
Example 3

Approval block

Short signature or approval blocks should not split when sufficient page space exists.

Open standalone print preview

On narrow screens the embedded example uses a screen-only inspection layout. Printing and the standalone document keep Folio's physical print rules.

View HTML
<ef-print-document>
  <ef-print-keep>
    <section class="folio-card">
      <h2>Approval</h2>
      <p><strong>Decision owner:</strong> Engineering</p>
      <p><strong>Status:</strong> Accepted</p>
      <p class="folio-meta">The browser may still fragment an oversized keep block.</p>
    </section>
  </ef-print-keep>
</ef-print-document>