Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: line-clamp and output elements, at the clamp point</title>
<link rel="match" href="reference/line-clamp-form-output-003-ref.html">
<meta name="assert" content="Content within an output element before an ancestor's clamp point remains visible, while content after the clamp point is hidden.">
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
body {
font: 25px/1 Ahem;
}
output {
background: cyan;
}
.clamp {
line-clamp: 2;
width: 240px;
background: yellow;
}
</style>
<div class="clamp">
XX<br>
<output>XX<br>XX<br>XX</output><br>
XX<br>
XX<br>
XX
</div>