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-bfc.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>A line-clamp container must establish an independent block formatting context</title>
<link rel="author" title="Seva Alipov" href="mailto:salipov@mozilla.com">
<link rel="match" href="line-clamp-bfc-ref.html">
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
.clamp-box {
border: 1px solid;
width: 50px;
overflow: clip;
line-clamp: 1;
font-family: ahem;
}
.float {
float: left;
width: 100px;
height: 100px;
border: 1px solid black;
padding: 10px;
font-family: ahem;
}
</style>
<div class="float">F</div>
<!-- .clamp-box should exclude .float -->
<div class="clamp-box">A<br>B</div>