CSS box-decoration-break Property

Beginner
6 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The box-decoration-break property controls how an element’s decorations are drawn when the box is split into fragments — across wrapped lines, CSS columns, or printed pages.

It affects background, padding, border, border-radius, box-shadow, border-image, clip-path, and margin. The initial value is slice.

Limited availability · Not Baseline.

Not deprecated and not experimental, but support is incomplete in Safari (prefix + mainly inline breaks). Prefer progressive enhancement for clone highlights.

CSS Syntax

syntax.css
box-decoration-break: slice | clone | initial | inherit;

For Safari, also set -webkit-box-decoration-break to the same value, placed before the standard property.

Property Values

ValueDescriptionTry it
sliceDecorations paint as one box, then cut at each break. Initial valueTry it
cloneEach fragment gets its own full decorationsTry it
With columnsBlock fragments in a multi-column layoutTry it
initialResets to sliceTry it
inheritTakes the parent’s box-decoration-break valueTry it

How to Use box-decoration-break

Add decorations first, force a break, then choose slice or clone.

  1. Style the element with background, padding, border, and/or radius so decorations are visible.
  2. Create fragmentation: wrap inline text, use <br>, or flow into columns.
  3. Set -webkit-box-decoration-break, then box-decoration-break, to slice or clone.
  4. Compare both values — clone is what most highlight and pill designs need.
PieceRequired?Role
Visible decorationsYesBackground, border, padding, radius, or shadow to compare
A real breakYesLine wrap, forced break, columns, or print pages
slice or cloneYesContinuous cut vs full decoration per fragment
-webkit- prefixRecommendedSafari inline-fragment support

Live Preview

The marked span wraps onto several lines. Switch between slice and clone to see how radius and background behave at each break.

Decorations stay the same. Only how they split across lines changes.

Wrapped mark

CSS lets you style text that wraps onto multiple lines with a clean highlight on every fragment.

box-decoration-break: clone

CSS Examples

Each snippet keeps CSS focused on box-decoration-break. Use Try It Yourself for a live editor.

Example 1 — Default slice

Decorations look continuous, then cut where the line breaks.

CSS
<style>
  span {
    -webkit-box-decoration-break: slice;
    box-decoration-break: slice;
    background: #dbeafe;
    border: 2px solid #2563eb;
    border-radius: 12px;
    padding: 0 0.5em;
  }
</style>

<p><span>The<br>quick<br>fox</span></p>
Try It Yourself

How It Works

  1. Add decorations. Background, border, radius, and padding make the break obvious.
  2. Force line breaks. Each <br> splits the inline box into fragments.
  3. Keep the default. slice paints one continuous box, then cuts it at each break.
  4. Notice the cut. Middle lines often lose rounded ends because the “whole box” was sliced.

Example 2 — clone Highlight

Every wrapped line gets its own padded, rounded background.

CSS
<style>
  .mark {
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    background: #fef08a;
    border-radius: 0.35rem;
    padding: 0.1em 0.35em;
  }
</style>

<p>Style
  <span class="mark">text that wraps onto multiple lines</span>.
</p>
Try It Yourself

How It Works

  1. Mark the words. A <span> holds the highlight styles.
  2. Let it wrap. A narrow paragraph forces the span onto more than one line.
  3. Clone decorations. Each fragment gets its own background, padding, and radius.
  4. Why students use it. Wrapped highlights and pills look finished instead of sliced in half.

Example 3 — Multi-Column Fragments

Block content can split across columns; clone wraps each piece.

CSS
<style>
  .cols { columns: 2; column-gap: 1rem; }
  .box {
    display: block;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    background: #dcfce7;
    border: 2px solid #16a34a;
    border-radius: 12px;
    padding: 0.5rem;
  }
</style>

<div class="cols">
  <span class="box">The<br>quick<br>fox jumps</span>
</div>
Try It Yourself

How It Works

  1. Create columns. columns: 2 can split one box across column boxes.
  2. Decorate the block. Border, radius, and background show at each fragment edge.
  3. Use clone. Each column piece gets a full border and radius set.
  4. Check Safari. Block fragmentation support is weaker there — treat this as progressive enhancement.

Edge Cases & Pitfalls

If clone looks wrong, check these first.

no break

Nothing changes on a single line

Without a wrap, column split, or page break, slice and clone look the same. Force a real fragment first.

prefix

Safari still needs -webkit-

Put -webkit-box-decoration-break before the standard property. Safari mainly supports inline fragmentation with the prefix.

background

clone redraws backgrounds

With clone, each fragment paints the background again. A no-repeat image can still appear once per fragment.

outline

Outline is not in the decoration list

outline is not listed among the properties this value remaps. Rely on border and background for fragment demos.

columns

Block splits need modern engines

Full clone for column and page breaks landed later (e.g. Chrome 130+). Test multi-column demos in current browsers.

Browser Support

box-decoration-break is a browser CSS property for fragmented boxes. Node.js, Deno, and Bun do not apply it.

✓ Limited availability · Not Baseline

box-decoration-break

Firefox 32+ full. Chrome/Edge 130+ full (earlier: partial via -webkit). Safari: -webkit prefix, mainly inline. IE: none.

72% full modern coverage (approx.)
Google Chrome 130+
Full support
Mozilla Firefox 32+
Full support
Microsoft Edge 130+
Full support
Opera 116+
Full support
Apple Safari -webkit (inline)
Partial support
Samsung Internet Chromium-based
Partial / improving
Internet Explorer No support
Not supported
box-decoration-break Limited &middot; not Baseline

Bottom line: Ship clone highlights as progressive enhancement. Always include -webkit-box-decoration-break for Safari. It is not a runtime API.

Key Takeaways

  • Role: how decorations draw when one box becomes many fragments.
  • slice: one continuous paint, cut at breaks (default).
  • clone: each fragment gets its own border, padding, and radius.
  • Prefix: set -webkit-box-decoration-break before the standard property.

One line: wrapped highlight + box-decoration-break: clone = a finished pill on every line.

Frequently Asked Questions

It controls how background, padding, border, border-radius, box-shadow, and related decorations are drawn when one element splits into fragments across lines, columns, or pages.
slice paints decorations as if the box were whole, then cuts that painting at each break. clone paints a full decoration set on every fragment, so each piece gets its own padding, border, and radius.
The initial value is slice. If you omit the property, browsers use slice.
Use clone for wrapped highlights, pills, and badges where every line should look like its own rounded box. Use slice when you want one continuous decoration across the break.
Yes for broader Safari support. Set -webkit-box-decoration-break first, then the standard box-decoration-break. Safari still relies on the prefix for inline fragments and does not fully support block fragmentation.
It has Limited availability and is not Baseline. Firefox 32+ and Chrome/Edge 130+ support the standard property fully. Safari needs -webkit-box-decoration-break and mainly for inline breaks. Internet Explorer has no support. It is a browser CSS property, not a Node.js feature.

Next: box-reflect

Explore the non-standard reflection effect used in some WebKit browsers.

box-reflect tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful