regions-resizing-003

CSS Regions: resizing region that is sized using viewport units

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Flags
ahem, dom, http
Assertion
Test checks that resizing the viewport of a page containing a region sized using viewport units correctly relayouts the region's contents.

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3 		<title>CSS Regions: resizing region that is sized using viewport units</title>
 4 		<link href="mailto:mibalan@adobe.com" rel="author" title="Mihai Balan">
 5 		<link href="http://www.w3.org/TR/css3-regions/#the-flow-into-property" rel="help">
 6 		<link href="http://www.w3.org/TR/css3-regions/#flow-from" rel="help">
 7 		<link href="http://www.w3.org/TR/css3-values/#viewport-relative-lengths" rel="help">
 8 		<meta content="dom ahem http" name="flags">
 9 		<meta content="Test checks that resizing the viewport of a page containing a region
10 				sized using viewport units correctly relayouts the region's contents." name="assert">
11 		<link href="reference/regions-resizing-001-ref.htm" rel="match">
12 		<!-- The <script type="text/css"> below is just a textual container for styles that will be
13 		injected in the iframe at load time.-->
14 		<script type="text/css" id="test-styles">
15 		#region {
16 			width: 80vw;
17 			height: 100vh;
18 		}
19 		</script>
20 		<script src="support/util.js" type="text/javascript"></script>
21 		<script type="text/javascript">
22 		window.addEventListener("load", function() {
23 			injectStylesInIFrame("#test-styles", "iframe");
24 			resizeViewportTo("iframe", 100, 100);
25 		})
26 		</script>
27 	</head>
28 	<body>
29 		<p>Test passes if you see a green square below and no red.</p>
30 		<p>The test also fails if the there's a green block that is <strong>not</strong> a square (e.g. rectangle or polygon).</p>
31 		<iframe width="400" height="400" frameborder="0" src="support/region-in-body.html"></iframe>
32 	
33 </body></html>