line-clamp
Limited availability
The line-clamp
CSS property limits the text in a block container to a certain number of lines. The prefixed -webkit-line-clamp
is widely supported but only works with -webkit-box-orient: vertical
in combination with display: -webkit-box
or display: -webkit-inline-box
.
To learn more, see
-webkit-line-clamp at MDN.
Compatibility (view on caniuse.com)
- Chrome ❌ Search for bugs Search for Chromestatus entry
- Chrome Android ❌ Search for bugs Search for Chromestatus entry
- Edge ❌ Search for bugs Search for Chromestatus entry
- Firefox ❌ Search for bugs Search for standards position
- Firefox for Android ❌ Search for bugs Search for standards position
- Safari ❌ Search for bugs Search for standards position
- Safari on iOS ❌ Search for bugs Search for standards position