servo/tests/wpt/css-tests/css-regions-1_dev/html/regions-dialog-002.htm

51 lines
No EOL
1.4 KiB
HTML

<!DOCTYPE html>
<html><head>
<title>CSS Regions Test: flowing dialog elements in region</title>
<link href="mailto:badea@adobe.com" rel="author" title="Catalin Badea">
<link href="mailto:mibalan@adobe.com" rel="reviewer" 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="dom" name="flags">
<meta content="Test checks that dialog elements are correctly flowed into a region." name="assert">
<link href="reference/regions-dialog-002-ref.htm" rel="match">
<style>
#content {
position: static;
display: block;
width: 30px;
height: 30px;
margin: 0px;
background-color: green;
flow-into: f;
}
#region {
width: 100px;
height: 100px;
background-color: gray;
flow-from: f;
}
.red {
width: 100px;
height: 100px;
background-color: red;
}
</style>
</head>
<body>
<ol>
<li>Test passes if you see a green square inside a gray square.</li>
<li>You shouldn't see any red.</li>
</ol>
<dialog id="content"></dialog>
<div id="region">
<div class="red"></div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
var dialog = document.getElementsByTagName('dialog')[0];
dialog.show();
});
</script>
</body></html>