Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-inline/text-box-trim/new-fc-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>text-box-trim with block formatting context root children</title>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<style>
.container {
position: relative;
text-box-trim: trim-both;
font-family: Ahem;
font-size: 20px;
line-height: 40px;
color: green;
background: red;
}
.filler {
position: absolute;
width: 100px;
height: 20px;
background: green;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="width:100px; height:100px; background:red;">
<div class="container">
<div style="display:flow-root;">xxxxx</div>
<div style="display:flow-root;">xxxxx</div>
<div style="display:flow-root;">xxxxx</div>
<div class="filler" style="top:20px;"></div>
<div class="filler" style="top:60px;"></div>
</div>
</div>