content-visibility-042.html (988B)
1 <!doctype HTML> 2 <html class="reftest-wait"> 3 <meta charset="utf8"> 4 <title>Content Visibility: pseudo elements</title> 5 <link rel="author" title="Rakina Zata Amni" href="mailto:rakina@chromium.org"> 6 <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> 7 <link rel="match" href="content-visibility-042-ref.html"> 8 <meta name="assert" content="content-visibility elements paints ::before and ::after when hidden is removed"> 9 10 <script src="/common/reftest-wait.js"></script> 11 12 <style> 13 #container::before { 14 content: "This test "; 15 color: green; 16 } 17 .hasAfter::after { 18 content: "PASSES."; 19 background: green; 20 color: white; 21 } 22 .hidden { 23 content-visibility: hidden; 24 } 25 </style> 26 <div id="container" class=hidden style="display:none;"></div> 27 28 <script> 29 async function runTest() { 30 container.classList.add("hasAfter"); 31 container.classList.remove("hidden"); 32 container.style = ""; 33 requestAnimationFrame(takeScreenshot); 34 } 35 36 window.onload = runTest; 37 </script> 38 </html>