24 lines
725 B
HTML
24 lines
725 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>CSS Overflow: `min-height` greater than `max-height` with `line-clamp: auto`</title>
|
|
<link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com">
|
|
<link rel="help" href="https://drafts.csswg.org/css-overflow-4/#line-clamp">
|
|
<link rel="match" href="reference/webkit-line-clamp-005-ref.html">
|
|
<meta name="assert" content="The block size constraint used for line-clamp: auto is the maximum of min-height and max-height">
|
|
<style>
|
|
.clamp {
|
|
line-clamp: auto;
|
|
min-height: 4lh;
|
|
max-height: 3lh;
|
|
font: 16px / 32px serif;
|
|
white-space: pre;
|
|
padding: 0 4px;
|
|
background-color: yellow;
|
|
}
|
|
</style>
|
|
<div class="clamp">Line 1
|
|
Line 2
|
|
Line 3
|
|
Line 4
|
|
Line 5
|
|
Line 6</div>
|