2 div { width:
100px; height:
100px; }
3 #target { margin-top: -
100px; background-color: green; }
4 #target:empty { display: none; }
7 This tests that specifying
<tt>display: none;
</tt> for the
<tt>:empty
</tt>
8 pseudoclass doesn
’t affect non-empty elements.
10 <div style=
"background-color: red;"></div>
11 <div id=
"target"><span></span></div>
14 if (window
.testRunner
)
15 testRunner
.dumpAsText();
17 document
.getElementById("result").innerText
= document
.getElementById("target").offsetWidth
=== 100 ? "PASS" : "FAIL";