CSS box-decoration-break Property

The box-decoration-break property controls how an element's decorations are drawn when its box is divided into multiple fragments.

Fragmentation can occur when inline text wraps across lines or when content is divided across columns or pages. The property determines whether decorations are treated as parts of one continuous box or are applied independently to each fragment.

It accepts two values: slice and clone. These values affect decorations such as backgrounds, borders, border radii, padding, and box shadows without changing the element's text content.

box-decoration-break Syntax

Specify whether decorations should be sliced across fragments or repeated independently for each fragment.

selector {
  box-decoration-break: clone;
}

The general syntax is:

selector {
  box-decoration-break: slice | clone;
}

slice

.highlight {
  box-decoration-break: slice;
}

Decorations are rendered as though the element were one continuous box, then divided at fragmentation boundaries.

clone

.highlight {
  box-decoration-break: clone;
}

Decorations are drawn independently for each fragment.

WebKit-Prefixed Declaration

.highlight {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

The prefixed declaration provides compatibility with browsers that require the WebKit-prefixed property.

CSS-Wide Keywords

.inherited {
  box-decoration-break: inherit;
}
.reset {
  box-decoration-break: initial;
}
.unset {
  box-decoration-break: unset;
}
.reverted {
  box-decoration-break: revert;
}
.layer-reverted {
  box-decoration-break: revert-layer;
}

CSS-wide keywords must be used alone rather than combined with slice or clone.

Property Values

The box-decoration-break property accepts two primary values.

Value Description
slice Draws decorations as part of one continuous box and slices them at fragment boundaries. This is the initial value.
clone Draws decorations independently for each fragment, including decorations at fragment edges.

CSS-Wide Keywords

Value Description
inherit Inherits the computed value from the parent element.
initial Resets the property to slice.
unset Resets the property to slice because the property is not inherited.
revert Reverts the property according to cascade origin rules.
revert-layer Reverts the property according to cascade layer rules.

Property Characteristics

Characteristic Value
Initial value slice
Inherited No
Applies to Elements that can be broken into multiple fragments
Computed value Specified keyword
Animation type Discrete
Percentages Not applicable
Property type Individual property

The property changes the rendering of decorations at fragmentation boundaries. It does not directly control where an element breaks.

How It Works

When an element is divided into multiple fragments, the browser must decide how its decorations should appear at the boundaries.

Step 1: Create Wrapping Text

<p class="example">
  This paragraph contains
  <span class="highlight">highlighted text that wraps across multiple lines</span>.
</p>

Step 2: Limit the Available Width

.example {
  max-width: 260px;
  line-height: 2;
}

The limited width encourages the highlighted text to wrap into multiple line boxes.

Step 3: Add Decorations

.highlight {
  padding: 4px 8px;
  border: 2px solid #1769aa;
  border-radius: 8px;
  background-color: #e7f3fc;
}

Step 4: Use slice

.highlight {
  box-decoration-break: slice;
}

The decorations are treated as portions of a continuous decorated box.

Step 5: Use clone

.highlight {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Each line fragment receives its own decoration treatment, including padding, borders, and rounded ends.

The difference is most noticeable when the fragmented element has a background, border, border radius, padding, or box shadow.

The slice Value

The slice value treats the decorations of fragmented content as parts of one continuous decorated box.

.highlight {
  box-decoration-break: slice;
}

Inline Text Example

.highlight {
  padding: 4px 10px;
  border: 2px solid #1769aa;
  border-radius: 10px;
  background-color: #e7f3fc;
  box-decoration-break: slice;
}

When the text wraps, the decorations are sliced at the line boundaries instead of creating complete independent boxes around every line fragment.

Background Gradient

.highlight {
  background: linear-gradient(90deg, #1769aa, #7bb9e8);
  color: #ffffff;
  box-decoration-break: slice;
}

The background is painted as a continuous decoration and then divided among fragments according to the fragmentation rules.

Border Radius

.highlight {
  border: 2px solid #1769aa;
  border-radius: 12px;
  box-decoration-break: slice;
}

Rounded corners are associated with the unbroken decorated box rather than recreated at every fragment edge.

Box Shadow

.highlight {
  box-shadow: 0 2px 6px rgb(0 0 0 / 20%);
  box-decoration-break: slice;
}

The shadow is treated as a decoration of the continuous box, with the resulting fragments displaying the corresponding portions.

Use slice when the intended appearance is one continuous decorated element rather than several individually decorated fragments.

The clone Value

The clone value draws decorations independently for each fragment of an element.

.highlight {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Rounded Text Highlights

.highlight {
  padding: 4px 10px;
  border-radius: 8px;
  background-color: #e7f3fc;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Each wrapped line fragment receives its own rounded background and edge padding.

Borders Around Every Fragment

.highlight {
  padding: 4px 8px;
  border: 2px solid #1769aa;
  border-radius: 8px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Shadows Around Every Fragment

.highlight {
  padding: 4px 8px;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgb(0 0 0 / 20%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Gradient Backgrounds

.highlight {
  padding: 4px 8px;
  background: linear-gradient(90deg, #1769aa, #7bb9e8);
  color: #ffffff;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

With clone, the background is painted independently for each fragment rather than sliced from a single continuous background.

Important Difference

Cloned padding, borders, and other decorations are applied at fragment edges. This can change the available space for text and influence where wrapping occurs.

Use clone when each fragment should look like a complete decorated box.

slice vs. clone

The main difference is whether decorations are treated as one continuous box or independently painted for every fragment.

Feature slice clone
Initial value Yes No
Decoration model One continuous box Independent fragments
Backgrounds Sliced across fragments Painted separately
Borders Not recreated at every break edge Applied at fragment edges
Border radius Associated with the continuous box Applied independently to fragments
Padding Not duplicated at every break edge Applied to each fragment
Box shadows Continuous decoration sliced Drawn independently
Typical use Continuous visual treatment Rounded multi-line highlights

Comparing the Values

.highlight-slice {
  box-decoration-break: slice;
}
.highlight-clone {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Apply identical backgrounds, borders, and padding to both elements to compare the resulting fragments.

The difference becomes visible only when the element is actually fragmented.

Inline Elements and Line Wrapping

Inline text is one of the most common uses for box-decoration-break.

An inline element may produce multiple fragments when its content wraps onto additional lines.

Highlighted Span

<p class="example">
  This is
  <span class="highlight">a longer highlighted phrase that can wrap onto multiple lines</span>
  inside a paragraph.
</p>
.example {
  max-width: 280px;
  line-height: 2;
}
.highlight {
  padding: 3px 8px;
  border-radius: 6px;
  background-color: #d8ecfa;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Inline Link

<p>
  Read our
  <a class="highlight-link" href="#">complete guide to building responsive web layouts</a>.
</p>
.highlight-link {
  padding: 3px 6px;
  border-radius: 5px;
  background-color: #e7f3fc;
  color: #1769aa;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Inline Code

<p>
  Use <code class="inline-code">background-color: #1769aa;</code>
  to apply a background color.
</p>
.inline-code {
  padding: 3px 6px;
  border-radius: 4px;
  background-color: #f0f0f0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Forcing a Wrapping Opportunity

.highlight {
  overflow-wrap: anywhere;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

The overflow-wrap property can allow long text to break when needed. The box-decoration-break property then controls how decorations appear on the resulting fragments.

The property does not create line breaks by itself. Text wrapping is controlled by available width and other text layout properties.

Backgrounds

The box-decoration-break property affects how backgrounds are painted across fragmented boxes.

Solid Background with slice

.highlight {
  background-color: #d8ecfa;
  box-decoration-break: slice;
}

Solid Background with clone

.highlight {
  background-color: #d8ecfa;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Solid colors can look similar with both values when no padding or rounded corners are present.

Gradient with slice

.highlight {
  background: linear-gradient(90deg, #1769aa, #7bb9e8);
  color: #ffffff;
  box-decoration-break: slice;
}

The gradient is treated as part of one continuous decoration and divided among fragments.

Gradient with clone

.highlight {
  background: linear-gradient(90deg, #1769aa, #7bb9e8);
  color: #ffffff;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

The gradient is painted independently within each fragment.

Background Image

.highlight {
  background-image: linear-gradient(90deg, #d8ecfa, #ffffff);
  padding: 4px 8px;
  border-radius: 8px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Background Clip

.highlight {
  padding: 4px 8px;
  border: 2px solid #1769aa;
  background-color: #d8ecfa;
  background-clip: padding-box;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

The background-clip property determines the background painting area, while box-decoration-break determines how the decoration is handled across fragments.

Gradient backgrounds provide a useful way to see the difference between slicing and cloning.

Borders and Border Radius

Borders and rounded corners are among the most noticeable decorations affected by box-decoration-break.

Border with slice

.highlight {
  border: 2px solid #1769aa;
  border-radius: 10px;
  box-decoration-break: slice;
}

The browser treats the borders and rounded corners as parts of a continuous decorated box.

Border with clone

.highlight {
  border: 2px solid #1769aa;
  border-radius: 10px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Each fragment receives its own border treatment and rounded corners.

Pill-Shaped Text Fragments

.pill-highlight {
  padding: 4px 12px;
  border: 2px solid #1769aa;
  border-radius: 999px;
  background-color: #e7f3fc;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Dashed Borders

.highlight {
  padding: 4px 8px;
  border: 2px dashed #1769aa;
  border-radius: 6px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Different Border Widths

.highlight {
  padding: 4px 8px;
  border-style: solid;
  border-color: #1769aa;
  border-width: 2px 6px;
  border-radius: 8px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

The cloned decorations are applied to each fragment according to the border values and fragmentation rules.

Use clone when rounded borders should enclose every wrapped line fragment independently.

Padding

The box-decoration-break property affects how padding is handled at fragment boundaries.

Padding with slice

.highlight {
  padding: 4px 12px;
  background-color: #e7f3fc;
  box-decoration-break: slice;
}

Padding is treated as part of the continuous decorated box rather than being duplicated at every break edge.

Padding with clone

.highlight {
  padding: 4px 12px;
  background-color: #e7f3fc;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Each fragment receives its own padding, including at the edges created by fragmentation.

Horizontal Padding

.highlight {
  padding-inline: 12px;
  border-radius: 8px;
  background-color: #e7f3fc;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Vertical Padding

.highlight {
  padding-block: 4px;
  background-color: #e7f3fc;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

For inline elements, vertical padding can extend visually beyond the line box without increasing its line height.

Padding and Line Height

.example {
  line-height: 2;
}
.highlight {
  padding: 4px 8px;
  border-radius: 6px;
  background-color: #e7f3fc;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Providing adequate line height helps prevent decorated inline fragments from visually overlapping adjacent lines.

Cloned padding can also influence line wrapping because additional space is needed at fragment edges.

Box Shadows

The box-decoration-break property affects how box shadows are rendered across fragments.

Shadow with slice

.highlight {
  padding: 4px 8px;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgb(0 0 0 / 20%);
  box-decoration-break: slice;
}

The shadow is treated as part of one continuous decoration and divided across fragments.

Shadow with clone

.highlight {
  padding: 4px 8px;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgb(0 0 0 / 20%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Each fragment receives its own shadow treatment.

Inset Shadow

.highlight {
  padding: 4px 8px;
  box-shadow: inset 0 0 0 2px #1769aa;
  border-radius: 8px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Rounded Shadow Fragments

.highlight {
  padding: 5px 10px;
  border-radius: 10px;
  background-color: #ffffff;
  box-shadow: 0 3px 8px rgb(0 0 0 / 18%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Rounded shadows can make each fragment appear as a separate decorated label.

Box shadows do not contribute to layout dimensions, so allow enough visual space to avoid unwanted overlap.

Multi-Column Layouts

Fragmentation can occur when content flows across multiple columns.

Multi-Column Container

.columns {
  columns: 2;
  column-gap: 24px;
}

Decorated Content Across Columns

<div class="columns">
  <div class="article-panel">
    <p>Content that may continue into another column...</p>
    <p>Additional content that fills the available space...</p>
  </div>
</div>
.columns {
  columns: 2;
  column-gap: 24px;
}
.article-panel {
  padding: 16px;
  border: 2px solid #1769aa;
  background-color: #e7f3fc;
  box-decoration-break: slice;
}

If the decorated element is fragmented across columns, slice treats its decorations as parts of one continuous box.

Cloned Column Decorations

.article-panel {
  padding: 16px;
  border: 2px solid #1769aa;
  background-color: #e7f3fc;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

With clone, each fragment can receive its own decorations at the column boundaries.

Preventing Column Breaks

.article-panel {
  break-inside: avoid;
}

The break-inside property requests that the browser avoid breaking the element across columns when possible.

The box-decoration-break property does not determine column count or where column breaks occur. Those behaviors are controlled by the fragmentation and multi-column layout rules.

Browser support for cloned decorations across columns may differ from support for wrapped inline text.

Paged Media

Content may also be fragmented across pages when a document is printed or displayed using paged media.

Printed Content

@media print {
  .print-panel {
    padding: 16px;
    border: 2px solid #333333;
    box-decoration-break: slice;
  }
}

When the element spans multiple pages, slice treats its decorations as portions of one continuous box.

Cloned Page Decorations

@media print {
  .print-panel {
    padding: 16px;
    border: 2px solid #333333;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }
}

Where supported, clone applies decorations independently to each page fragment.

Avoiding Page Breaks

@media print {
  .print-panel {
    break-inside: avoid;
  }
}

The browser attempts to keep the element together when possible.

Page Break Control

@media print {
  .new-section {
    break-before: page;
  }
}

The break-before property controls fragmentation, while box-decoration-break controls the appearance of decorations on the resulting fragments.

Print rendering can vary between browsers and PDF generation engines. Test the actual printed or exported output when decoration continuity is important.

Vendor Prefixes

Some browsers have historically required the -webkit- prefix for box-decoration-break, especially for the clone value.

Prefixed Declaration

.highlight {
  -webkit-box-decoration-break: clone;
}

Standard Declaration

.highlight {
  box-decoration-break: clone;
}

Recommended Combination

.highlight {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Place the prefixed declaration first and the standard declaration second.

Complete Example

.highlight {
  padding: 4px 8px;
  border-radius: 8px;
  background-color: #e7f3fc;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Browsers that recognize only the prefixed form can use it, while browsers supporting the standard property can use the unprefixed declaration.

Check current browser compatibility before removing the prefixed declaration from production stylesheets.

Cascade and Inheritance

The box-decoration-break property follows normal CSS cascade rules and is not inherited automatically.

Later Declaration

.highlight {
  box-decoration-break: slice;
  box-decoration-break: clone;
}

The later declaration wins when cascade priority is otherwise equal.

Higher Specificity

.highlight {
  box-decoration-break: slice;
}
.highlight.special {
  box-decoration-break: clone;
}

Not Inherited

.parent {
  box-decoration-break: clone;
}
.child {
  background-color: #e7f3fc;
}

The child retains the initial slice value unless another declaration changes it.

Explicit Inheritance

.parent {
  box-decoration-break: clone;
}
.child {
  box-decoration-break: inherit;
}

Reset to Initial

.highlight {
  box-decoration-break: initial;
}

The property returns to slice.

CSS Layers

@layer base, components;
@layer base {
  .highlight {
    box-decoration-break: slice;
  }
}
@layer components {
  .highlight {
    box-decoration-break: clone;
  }
}

For normal declarations, the later layer takes precedence.

When troubleshooting unexpected fragment decorations, inspect the computed value and any prefixed declarations that may also apply.

CSS Custom Properties

CSS custom properties can store reusable decoration-break values for related components.

Shared Value

:root {
  --decoration-break: clone;
}
.highlight {
  -webkit-box-decoration-break: var(--decoration-break);
  box-decoration-break: var(--decoration-break);
}

Fallback Value

.highlight {
  -webkit-box-decoration-break: var(--decoration-break, clone);
  box-decoration-break: var(--decoration-break, clone);
}

Component Variants

.highlight {
  --decoration-break: clone;
  -webkit-box-decoration-break: var(--decoration-break);
  box-decoration-break: var(--decoration-break);
}
.highlight.continuous {
  --decoration-break: slice;
}

Shared Highlight Styling

:root {
  --highlight-background: #e7f3fc;
  --highlight-radius: 8px;
}
.highlight {
  padding: 4px 8px;
  border-radius: var(--highlight-radius);
  background-color: var(--highlight-background);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Custom properties help maintain consistent decoration behavior across multiple components.

Responsive Design

Fragmentation often changes with available width, making box-decoration-break useful in responsive layouts.

Responsive Text Highlight

.highlight {
  padding: 4px 8px;
  border-radius: 8px;
  background-color: #e7f3fc;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

The same decorations can remain consistent as text wraps onto additional lines at smaller widths.

Media Query

.highlight {
  padding: 4px 10px;
  border-radius: 10px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
@media (max-width: 600px) {
  .highlight {
    padding: 3px 6px;
    border-radius: 6px;
  }
}

Container Query

.highlight-container {
  container-type: inline-size;
}
.highlight {
  padding: 4px 8px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
@container (max-width: 300px) {
  .highlight {
    padding: 2px 5px;
  }
}

Responsive Line Height

.highlight-text {
  line-height: 2;
}
@media (max-width: 600px) {
  .highlight-text {
    line-height: 2.2;
  }
}

Additional line height can help prevent decorated inline fragments from overlapping vertically.

Changing Decoration Behavior

.highlight {
  -webkit-box-decoration-break: slice;
  box-decoration-break: slice;
}
@media (max-width: 600px) {
  .highlight {
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }
}

This example uses continuous decorations on wider screens and independent fragment decorations on narrower screens.

The property does not determine when text wraps. It controls how the decorations appear after fragmentation occurs.

Practical Uses

The box-decoration-break property is useful for multi-line highlights, labels, links, inline code, and fragmented content.

Rounded Text Highlight

.text-highlight {
  padding: 4px 8px;
  border-radius: 8px;
  background-color: #d8ecfa;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Highlighted Link

.highlight-link {
  padding: 3px 6px;
  border-radius: 5px;
  background-color: #e7f3fc;
  color: #1769aa;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Gradient Highlight

.gradient-highlight {
  padding: 4px 8px;
  border-radius: 8px;
  background: linear-gradient(90deg, #1769aa, #7bb9e8);
  color: #ffffff;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Outlined Label

.outlined-label {
  padding: 4px 8px;
  border: 2px solid #1769aa;
  border-radius: 8px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Inline Code Highlight

.inline-code {
  padding: 3px 6px;
  border-radius: 4px;
  background-color: #f0f0f0;
  font-family: monospace;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Multi-Line Heading Highlight

.heading-highlight {
  padding: 4px 10px;
  border-radius: 8px;
  background-color: #173b5e;
  color: #ffffff;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

Fragmented Content Panel

.fragmented-panel {
  padding: 16px;
  border: 2px solid #1769aa;
  background-color: #e7f3fc;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

For predictable results, test decorated content at widths that force multiple fragments rather than evaluating only a single-line example.

box-decoration-break Example

The following example compares slice and clone using the same wrapping text, padding, border, and rounded background.

<div class="decoration-demo">
  <div class="demo-group">
    <h3>box-decoration-break: slice</h3>
    <p>
      <span class="highlight slice">This highlighted text wraps across multiple lines to show how decorations are sliced.</span>
    </p>
  </div>
  <div class="demo-group">
    <h3>box-decoration-break: clone</h3>
    <p>
      <span class="highlight clone">This highlighted text wraps across multiple lines to show how decorations are cloned.</span>
    </p>
  </div>
</div>
.decoration-demo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}
.decoration-demo .demo-group {
  min-width: 0;
  padding: 16px;
  border: 1px solid #cccccc;
}
.decoration-demo h3 {
  margin-bottom: 20px;
  font-size: 16px;
}
.decoration-demo p {
  max-width: 220px;
  line-height: 2.4;
}
.decoration-demo .highlight {
  padding: 4px 10px;
  border: 2px solid #1769aa;
  border-radius: 10px;
  background-color: #d8ecfa;
  color: #173b5e;
}
.decoration-demo .slice {
  -webkit-box-decoration-break: slice;
  box-decoration-break: slice;
}
.decoration-demo .clone {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
Browser Result

box-decoration-break: slice

This highlighted text wraps across multiple lines to show how decorations are sliced.

box-decoration-break: clone

This highlighted text wraps across multiple lines to show how decorations are cloned.

With slice, the decoration behaves as part of one continuous box. With clone, each line fragment receives its own padding, border, and rounded corners.

The prefixed declarations help maintain compatibility with browsers that have historically required -webkit-box-decoration-break.

Important Considerations

Keep the following points in mind when using box-decoration-break:

  • Purpose: Controls the appearance of decorations when an element is fragmented.
  • Initial value: slice.
  • Inheritance: The property is not inherited.
  • Accepted values: slice and clone.
  • slice: Treats decorations as parts of one continuous box.
  • clone: Draws decorations independently for each fragment.
  • Inline wrapping: Commonly used for highlighted text spanning multiple lines.
  • Backgrounds: Background painting differs between continuous and cloned fragments.
  • Borders: Cloned fragments can receive borders at their break edges.
  • Border radius: Cloned fragments can receive their own rounded corners.
  • Padding: Cloned padding is applied at fragment edges and can affect wrapping.
  • Box shadows: Shadows can be painted independently for cloned fragments.
  • Fragmentation: The property does not create line, column, or page breaks.
  • Multi-column layouts: Decoration behavior depends on fragmentation support.
  • Paged media: Print and PDF rendering may differ between engines.
  • Vendor prefixes: Some browsers require -webkit-box-decoration-break.
  • Animation: Changes between slice and clone are discrete.
  • Browser support: Support varies by browser, prefix, and fragmentation context.

Use clone when each fragment should have complete decorations, and slice when the element should retain the appearance of one continuous decorated box.

Browser Support

The box-decoration-break property has varying browser support, particularly for the unprefixed clone value and fragmentation across columns or pages.

For compatibility with browsers that require the WebKit-prefixed property, include both declarations:

.highlight {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

The prefixed declaration should appear before the standard declaration.

Support for inline text wrapping does not necessarily guarantee identical behavior for multi-column or paged-media fragmentation.

For current compatibility details, visit Can I Use? .

Specifications

The box-decoration-break property is defined in the CSS Fragmentation Module Level 3 specification.

CSS Fragmentation Module Level 3

The specification defines how decorations such as backgrounds, borders, padding, and shadows are handled when a box is fragmented.