servo/tests/wpt/css-tests/css-regions-1_dev/xhtml1/regions-stacking-context-004.xht

73 lines
No EOL
1.8 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>CSS Test: regions create stacking contexts</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-regions/#flow-from" rel="help" />
<meta content="ahem" name="flags" />
<meta content="Test checks that regions create stacking contexts for content flowed into them." name="assert" />
<link href="reference/regions-stacking-context-004-ref.xht" rel="match" />
<style>
#content {
opacity: 0.7;
}
#content &gt; div {
position: relative;
width: 100px;
height: 100px;
flow-into: flow;
}
.left {
top: 0;
left: 0;
background-color: lightgreen;
}
.center {
top: -75px;
left: 25px;
background-color: lightblue;
}
.right {
top: -150px;
left: 50px;
background-color: yellow;
}
#region {
width: 150px;
height: 150px;
flow-from: flow;
}
#region p{
height: 50%;
background-color: red;
}
#dummy {
background-color: purple;
width: 100px;
height: 100px;
margin-top: -75px;
margin-left: 75px;
}
</style>
</head>
<body>
<ol>
<li>You should see no red.</li>
<li>You should see four colored overlapping squares, from back to front: a green square, a blue square, a yellow square and a purple square.</li>
<!-- The purple square should be painted on top of the other ones because the region creates a stackign context for its contents. -->
</ol>
<div id="region">
<p>&#xA0;</p>
</div>
<div id="dummy"></div>
<div id="content">
<div class="left"></div>
<div class="center"></div>
<div class="right"></div>
</div>
</body></html>