Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-overflow/line-clamp/line-clamp-auto-065.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: `line-clamp: auto` places the ellipsis before a block with a set height that would not fit</title>
<link rel="match" href="reference/line-clamp-auto-065-ref.html">
<meta name="assert" content="A block with a set height is as tall whatever its content, so no clamp point inside it fits when it does not fit, and the ellipsis goes on the last line before it.">
<style>
.clamp {
line-clamp: auto;
max-height: 6lh;
font: 16px / 32px serif;
white-space: pre;
}
.with-height {
height: 3lh;
}
</style>
<div class="clamp">Line 1
Line 2
Line 3
Line 4
<div class="with-height">Line 5
Line 6</div>
Line 7</div>