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-floats-009.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: floats inside line-clamp clip to the container's edge, regardless of transforms</title>
<link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com">
<link rel="match" href="reference/line-clamp-with-floats-009-ref.html">
<meta name="assert" content="Floats inside a line-clamp container clip to the block-end content edge of the container, even if the float is transformed.">
<style>
.clamp {
line-clamp: 4;
font: 16px / 32px serif;
padding: 4px;
background-color: yellow;
}
.float {
float: left;
margin: 5px;
width: 50px;
height: 200px;
background-color: skyblue;
transform: rotate(30deg);
}
</style>
<div class="clamp">
<div class="float"></div>
Line 1 <br>
Line 2 <br>
Line 3 <br>
Line 4 <br>
Line 5
</div>