overflow-body-propagation-014.html (1123B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Test: two BODY elements</title> 4 <link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-overflow-3/#overflow-propagation"> 6 <meta name="assert" content="If there are multiple <body> elements, the 7 one that propagates `overflow` to the viewport is the first one. 8 9 Therefore, the first <body> should get `overflow: visible` and its 10 overflowing contents should be visible. And the second <body> should 11 be able to keep `overflow: hidden` and hide its overflowing contents."> 12 <link rel="match" href="overflow-body-propagation-012-ref.html"> 13 <style> 14 body { 15 overflow: hidden; 16 width: 0px; 17 height: 0px; 18 border: solid red; 19 border-width: 0 400px 200px 0; 20 margin-bottom: 0; 21 } 22 body > div { 23 background: green; 24 width: 400px; 25 height: 200px; 26 } 27 #clone { 28 border-color: green; 29 margin-top: 0; 30 } 31 #clone > div { 32 background: red; 33 } 34 </style> 35 <body> 36 <div></div> 37 </body> 38 <script> 39 let clone = document.body.cloneNode(true); 40 clone.id = "clone"; 41 document.documentElement.appendChild(clone); 42 </script>