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'.

Quick example

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

Quick facts

Initial value
none
Inherited
No
Applies to
block containers except multi-column containers
Animation type
integer

Values

none

line-clamp Browser Support

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.

Safe to use without fallbacks.

6+
68+
5+
17+
ESC