32 lines
861 B
HTML
32 lines
861 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>CSS Overflow: `line-clamp: auto` clamp height after IFC</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="With `line-clamp: auto`, if the clamp height is after an IFC, the clamp point will be set after the last line before that.">
|
|
<style>
|
|
.clamp {
|
|
line-clamp: auto;
|
|
max-height: 6lh;
|
|
font: 16px / 32px serif;
|
|
white-space: pre;
|
|
padding: 0 4px;
|
|
background-color: yellow;
|
|
}
|
|
.ifc {
|
|
display: flow-root;
|
|
background-color: orange;
|
|
}
|
|
.red {
|
|
display: flow-root;
|
|
background-color: red;
|
|
}
|
|
</style>
|
|
|
|
<div class="clamp">Line 1
|
|
Line 2
|
|
Line 3
|
|
Line 4
|
|
<div class="ifc red">Line 5
|
|
Line 6</div>Line 7</div>
|