Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: line-clamp and fieldset elements, before the clamp point</title>
<link rel="match" href="reference/line-clamp-form-fieldset-002-ref.html">
<meta name="assert" content="A fieldset before an ancestor's clamp point remains fully visible, while content past the clamp point is hidden.">
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
body {
font: 25px/1 Ahem;
}
input, button, select, textarea {
font: inherit;
}
legend {
background-color: lightgray;
}
.clamp {
line-clamp: 2;
width: 240px;
background: yellow;
}
</style>
<div class="clamp">
<fieldset><legend>XX</legend>XX<br>XX<br>XX</fieldset><br>
XX<br>
XX<br>
XX
</div>