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-with-abspos-025.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: abspos inside a clamped out float remains visible</title>
<link rel="match" href="reference/line-clamp-with-abspos-005-ref.html">
<meta name="assert" content="A float after the clamp point is hidden, but its abspos descendant remains visible when the line clamp container is its containing block.">
<style>
.clamp {
line-clamp: 4;
font: 16px / 32px serif;
padding: 0 4px;
white-space: pre;
background: yellow;
position: relative;
}
.float {
width: 50px;
height: 50px;
float: left;
background-color: red;
}
.abs {
position: absolute;
left: 0;
top: 0;
width: 20px;
height: 20px;
background: skyblue;
}
</style>
<div class=clamp>Line 1
Line 2
Line 3
Line 4
<div class=float><div class=abs></div></div>Line 5</div>