line-clamp

Limits the number of lines displayed in a block of text, automatically adding an ellipsis (...) at the end. It's the modern, non-prefixed way to do 'multiline truncation'.

It is documented as part of the CSS Overflow specification.

/* Usage Example */
.card-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  /* Standard property (supported in modern browsers) */
  line-clamp: 3;
  overflow: hidden;
}

/* Syntax */
line-clamp: none;

/* Global values */
line-clamp: inherit;
line-clamp: initial;
line-clamp: revert;
line-clamp: revert-layer;
line-clamp: unset;

This comparison shows how line-clamp works in a real project. View snippet →

Widely available Since 2015 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.

6+
68+
5+
17+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC