content-visibility-034.html (1153B)
1 <!doctype HTML> 2 <html class="reftest-wait"> 3 <meta charset="utf8"> 4 <title>Content Visibility: hidden element shifted down</title> 5 <link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> 6 <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> 7 <link rel="match" href="content-visibility-034-ref.html"> 8 <meta name="assert" content="content-visibility hidden element participates in layout"> 9 10 <script src="/common/reftest-wait.js"></script> 11 12 <style> 13 #container { 14 width: 150px; 15 height: 150px; 16 border: 1px solid blue; 17 content-visibility: hidden; 18 } 19 #spacer { 20 width: 100px; 21 height: 50px; 22 background: orange; 23 } 24 #checker { 25 width: 100px; 26 height: 50px; 27 background: blue; 28 } 29 </style> 30 31 <p>There should be a square blank box (with a blue border) between an orange square and a blue rectangle. 32 <div id="spacer"></div> 33 <div id="container">Fail</div> 34 <div id="checker"></div> 35 36 <script> 37 function runTest() { 38 document.getElementById("spacer").style.height = "100px"; 39 requestAnimationFrame(takeScreenshot); 40 } 41 42 window.onload = requestAnimationFrame(() => requestAnimationFrame(runTest)); 43 </script> 44 </html>