regions-resizing-007

CSS Regions: resizing region with percentage size inside a container that has size set in 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 that has a percentage size relative to a parent sized using viewport units correctly relayouts the region's contents.

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3 		<title>CSS Regions: resizing region with percentage size inside a container that has size set in 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 				that has a percentage size relative to a parent sized using viewport units correctly
11 				relayouts the region's contents." name="assert">
12 		<link href="reference/regions-resizing-001-ref.htm" rel="match">
13 		<!-- The <script type="text/css"> below is just a textual container for styles that will be
14 		injected in the iframe at load time.-->
15 		<script type="text/css" id="test-styles">
16 		html, body {
17 			height: 100%;
18 		}
19 		#region-parent {
20 			width: 50vw;
21 			height: 80vh;
22 		}
23 		#region {
24 			width: 80%;
25 			height: 70%;
26 		}
27 		</script>
28 		<script src="support/util.js" type="text/javascript"></script>
29 		<script type="text/javascript">
30 		window.addEventListener("load", function() {
31 			injectStylesInIFrame("#test-styles", "iframe");
32 			resizeViewportTo("iframe", 200, 200);
33 		})
34 		</script>
35 	</head>
36 	<body>
37 		<p>Test passes if you see a green square below and no red.</p>
38 		<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>
39 		<iframe width="437" height="143" frameborder="0" src="support/region-in-container.html"></iframe>
40 	
41 </body></html>