servo/tests/wpt/css-tests/css-break-3_dev/html/floats-in-named-flow-030.htm

89 lines
No EOL
2 KiB
HTML

<!DOCTYPE html>
<html><head>
<title>CSS Regions: margins around unforced breaks when break is around float</title>
<link href="mailto:mibalan@adobe.com" rel="author" title="Mihai Balan">
<link href="http://www.w3.org/TR/css3-regions/#the-flow-into-property" rel="help">
<link href="http://www.w3.org/TR/css3-break/#break-margins" rel="help">
<link href="http://www.w3.org/TR/css3-break/#parallel-flows" rel="help">
<meta content="ahem" name="flags">
<meta content="Test checks that margins are correctly preserved when content
has floats and is fragmented via unforced breaks." name="assert">
<link href="reference/floats-in-named-flow-030-ref.htm" rel="match">
<style>
article {
font-family: Ahem;
font-size: 20px;
line-height: 1em;
}
.flow {
flow-into: f;
}
.spaced {
margin: 1em 2em 3em 5em;
color: green;
}
.float {
float: left;
color: blue;
}
.bordered {
border: 10px solid black;
}
.region {
flow-from: f;
/* float: left; is used to trigger shrink-to-fit sizing */
float: left;
margin-left: 10px;
}
.region > p {
background: red;
}
</style>
</head>
<body>
<p>
<!-- TODO Determine what the outcome should be - currently expecting a resolution on
the issue on www-style/css3-break -->
Test passes if you see two colored squares each inside a black-bordered rectangle:
</p><ul>
<li>The black-bordered rectangles should be separated by a small vertical space</li>
<li>The green square should have its top edge flush with the top border of its
containing rectangle</li>
</ul>
You should see no red.
<p></p>
<div style="height: 125px;" class="bordered region">
<p>&nbsp;</p>
</div><div class="bordered region">
<p>&nbsp;</p>
</div>
<div class="region">
<p>&nbsp;</p>
</div>
<article class="flow">
<div class="spaced float">
xxxxx<br>
xxxxx<br>
xxxxx<br>
xxxxx<br>
xxxxx
</div>
<div class="spaced">
xxxxx<br>
xxxxx<br>
xxxxx<br>
xxxxx<br>
xxxxx
</div>
</article>
</body></html>