Dev Helpers

CSS / Production surfaces

Perforated tear line

Dev Helpers · October 1, 2025

A repeated line can suggest a perforation without requiring an image asset. Its rhythm should hold up as the panel width changes.

Worked example

<style>
  .demo {
    border: 0;
    border-block-start: 3px dashed #475569;
    margin-block: 1.5rem;
  }
</style>
<hr class="demo" />

Implementation notes

A decorative tear line can disappear when background graphics are disabled for printing. Add a print-specific border when the separation must survive on paper.

Try it yourself

Resize until the last dash is only partially visible.

Open the CSS example →

Editorial date October 1, 2025 · Published December 6, 2026

Related articles

Fluid width with a maximum

A fluid container needs a small-screen width and a large-screen maximum. Outer gutters should remain visible at both extremes.

Square aspect ratio

A square ratio reserves equal sides even before media loads. Fit rules decide whether rectangular content is cropped or letterboxed.