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-form-output-005.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: line-clamp and output elements, direct clamping</title>
<link rel="match" href="reference/line-clamp-form-output-005-ref.html">
<meta name="assert" content="A directly clamped block-level output element shows lines before the clamp point followed by the clamp marker, while following lines are hidden.">
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
.clamp {
display: block;
width: 240px;
font: 25px/1 Ahem;
line-clamp: 2;
background: yellow;
}
</style>
<output class="clamp">XX<br>XX<br>XX<br>XX</output>