Open this example in the interactive library
Source code
<style>
.demo {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
max-width: 24ch;
}
</style>
<p class="demo">
A long paragraph is still present in the markup. Only the first two lines fit
in this compact card.
</p>