sheet-going-away-002.html (663B)
1 <!doctype html> 2 <meta charset="utf-8"> 3 <title>CSS Test: invalidation of class changes when the sheet the style depends on goes away</title> 4 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> 5 <link rel="help" href="https://drafts.csswg.org/selectors-4/#invalid"> 6 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1432850"> 7 <link rel="match" href="sheet-going-away-002-ref.html"> 8 <style> 9 p { color: green; } 10 </style> 11 <style id="style"> 12 .red p { color: red; } 13 </style> 14 <body class="red"> 15 <p> 16 Should be green. 17 </p> 18 <script> 19 document.body.offsetTop; 20 document.body.className = ""; 21 style.remove(); 22 </script> 23 </body>