servo/tests/wpt/css-tests/css-regions-1_dev/html/floats-in-named-flow-005.htm

70 lines
No EOL
2.1 KiB
HTML

<!DOCTYPE html>
<html><head>
<title>CSS Regions: separate floats with percent size in sized region</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">
<meta content="" name="flags">
<meta content="Test checks that floats inside a named flow are sized relative
to the region container, regardless of their initial block formatting context." name="assert">
<link href="reference/floats-in-named-flow-005-ref.htm" rel="match">
<style>
.flow {
flow-into: f;
color: gray;
}
.dummy-bfc {
/* This creates a new block formatting context */
overflow: hidden;
}
.floater {
width: 20%;
height: 50px;
background-color: lightblue;
}
.left {
float: left;
}
.right {
float: right;
}
.region {
flow-from: f;
width: 250px;
margin: 5px;
border: 2px solid black;
}
.region > p {
background: red;
}
</style>
</head>
<body>
<div class="dummy-bfc">
<div class="flow floater left"></div>
</div>
<p>
Test passes if you see some filler gray text and three blue squares inside a black-bordered
rectangle. One blue square should be in the top left corner, another in the top right
corner and the third one should be somewhere along the left border, below the top-left
one.<br>
Test fails is you see any red.
</p>
<div class="flow">
<div class="floater right"></div>
This is filler text. This is filler text. This is filler text. This is filler text. This
is filler text. This is filler text. This is filler text. This is filler text. This is
filler text. This is filler text. This is filler text. This is filler text. This is
filler text. This is filler text. This is filler text. This is filler text. This is
<div class="floater left"></div>
filler text. This is filler text. This is filler text. This is filler text. This is
filler text. This is filler text. This is filler text. This is filler text.
</div>
<div class="region">
<p>&nbsp;</p>
</div>
</body></html>