blob: 13115abdfeebdaf9f8e1172a6abd7e9bf7803417 [file] [log] [blame]
<style>
div { width: 100px; height: 100px; }
#target { margin-top: -100px; background-color: green; }
#target:empty { display: none; }
</style>
<p>
This tests that specifying <tt>display: none;</tt> for the <tt>:empty</tt>
pseudoclass doesn&rsquo;t affect non-empty elements.
</p>
<div style="background-color: red;"></div>
<div id="target"><span></span></div>
<p id="result"></p>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
document.getElementById("result").innerText = document.getElementById("target").offsetWidth === 100 ? "PASS" : "FAIL";
</script>