Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>CSS Overflow: size containment inside clamping by height</title>
<link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com">
<link rel="match" href="reference/line-clamp-auto-047-ref.html">
<meta name="assert" content="Checks that when clamping by height, size contained boxes with `min-height` set behave as if they had `height` set to that value.">
<style>
.clamp {
line-clamp: auto;
max-height: 4.5lh;
width: 500px;
background-color: yellow;
}
.size-containment {
contain: size;
min-height: 2lh;
text-align: right;
border: 1px solid black;
}
</style>
<div class="clamp">
<div class="size-containment">
Line A <br>
Line B <br>
Line C <br>
Line D <br>
Line E <br>
</div>
Line 1 <br>
Line 2
<div class="size-containment">
Line A <br>
Line B <br>
Line C <br>
Line D <br>
Line E <br>
</div>
Line 3
</div>