blob: 220657e0ac6bfc2728bf0fc7d4ea1862882b4632 [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.testRunner)
testRunner.dumpAsText();
document.getElementById("result").innerText = document.getElementById("target").offsetWidth === 100 ? "PASS" : "FAIL";
</script>