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.
Syntax
/* 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;
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.
6+
68+
5+
17+