before-dynamic-display-none.html (576B)
1 <!doctype html> 2 <title>CSS Test: ::before box removed when display set to 'none'.</title> 3 <link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#generated-content"> 4 <link rel="match" href="../reference/pass_if_pass_below.html"> 5 <style> 6 #id::before { 7 content: "FAIL"; 8 position: absolute; 9 width: 100px; 10 height: 100px; 11 background-color: red; 12 } 13 #id.none::before { 14 display: none; 15 } 16 </style> 17 <p>Test passes if there is the word "PASS" below.</p> 18 <div id="id" class="open">PASS</div> 19 <script> 20 id.offsetTop; 21 id.className = "none"; 22 </script>