CKTIS / CSS
box-decoration-break — decorating fragmented boxes
The box-decoration-break property controls how box fragments are decorated when a box breaks across lines, columns, or pages.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
box-decoration-break: slice | clone;box-decoration-break controls fragment decorations, not break placement. It applies to all elements, is not inherited, and initially has the value slice.
slice decorates the box as a whole, then cuts it: broken edges receive no added border, padding, or shadow. clone gives each fragment its own border, padding, rounded corners, and shadow; backgrounds are drawn independently in each fragment. Cloned margins on block-level boxes are truncated.
The example forces two lines. Compare the cut edges of slice with the separate frames of clone. This is the expected appearance, not an executed test result; verify it in the target browser.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>box-decoration-break</title>
<style>
p { font: 24px/2 monospace; }
span {
padding: 2px 8px;
border: 2px solid #164;
border-radius: 8px;
background: #dfd;
}
.slice { box-decoration-break: slice; }
.clone { box-decoration-break: clone; }
</style>
<p><span class="slice">slice: first<br>second</span></p>
<p><span class="clone">clone: first<br>second</span></p>
</html>Result
Expected visual result: two two-line samples. The slice sample lacks added border and padding at the line-break edges; the clone sample has a separate rounded border and padding around each line fragment.
The description gives the example’s expected appearance, not the result of a rendering test. Open the example in the target browser and compare the border and padding at the line break for `slice` and `clone`.