servo/tests/wpt/web-platform-tests/css/css-regions/floats/floats-in-named-flow-021.html

85 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>CSS Regions: cleared non-float content after a forced region break</title>
<link rel="author" title="Mihai Balan" href="mailto:mibalan@adobe.com">
<link rel="help" href="http://www.w3.org/TR/css3-regions/#the-flow-into-property">
<meta name="flags" content="ahem">
<meta name="assert" content="Test checks that cleared non-float content after a float that
also has a forced region break does not lead to an empty region.">
<link rel="match" href="reference/floats-in-named-flow-021-ref.html">
<style>
article {
font-family: Ahem;
font-size: 20px;
line-height: 1em;
}
.flow {
flow-into: f;
}
.float {
float: left;
color: blue;
break-after: region;
}
.clear {
clear: left;
color: green;
}
.bordered {
border: 10px solid black;
}
.region {
flow-from: f;
max-height: 100px;
max-width: 100px;
margin-bottom: 10px;
}
.region > p {
background: red;
}
</style>
</head>
<body>
<p>
Test passes if you see two squares separated by a small vertical space. The squares should
have a black outline, the top square should be blue and the bottom one should be green.<br>
You should see no red.
</p>
<div class="bordered region">
<p>&nbsp;</p>
</div>
<div class="bordered region">
<p>&nbsp;</p>
</div>
<!-- In case the clear + forced break lead to an empty region, the content will flow in this
third region ending up without a border. -->
<div class="region">
<p>&nbsp;</p>
</div>
<article class="flow">
<div class="float">
xxxxx
xxxxx
xxxxx
xxxxx
xxxxx
</div>
<div class="clear">
xxxxx
xxxxx
xxxxx
xxxxx
xxxxx
</div>
</article>
</body>
</html>