Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: line-clamp doesn't apply to inline boxes</title>
<link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com">
<link rel="match" href="reference/webkit-line-clamp-001-ref.html">
<meta name="assert" content="line-clamp only affects block containers, not inline boxes">
<style>
.block {
font: 16px / 32px serif;
background-color: yellow;
}
.clamp {
line-clamp: 4;
white-space: pre;
}
</style>
<div class="block"><span class="clamp">Line 1
Line 2
Line 3
Line 4
Line 5</span></div>