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
noneInherited
No
Applies to
block containers except multi-column containers
Animation type
integer
Values
noneline-clamp Browser Support
Limited availability96% global usage
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Not ready for production without a fallback.