<?xml-stylesheet href="../../../style/xml-full.css" type="text/css"?>
<?xml-stylesheet href="css3-modsel-d5b.css" type="text/css"?>
<test xmlns:xlink="http://www.w3.org/1999/xlink">
 <title>NEGATED :indeterminate and :checked</title>
 <author>Tantek Çelik</author>
 <author>Ian Hickson</author>
 <metadata>
  <item> <name>CSS 3 Module</name> <data>W3C Selectors</data> </item>
  <item> <name>Next</name> <data xlink:type="simple" xlink:href="css3-modsel-d5c.xml">:indeterminate and :checked</data> </item>
  <item> <name>Previous</name> <data xlink:type="simple" xlink:href="css3-modsel-d5a.xml">:indeterminate and :checked</data> </item>
  <item> <name>Test #</name> <data>299 of 302</data> </item>
  <item> <name>Testing</name> <data>NEGATED :indeterminate and :checked</data> </item>
  <item> <name>ID</name> <data>d5b</data> </item>
  <item> <name>Date</name> <data>2004-03-03</data> </item>
  <item> <name>Revision</name> <data>1.0</data> </item>
 </metadata>
   <requirement>The UA must support ECMA-262 and DOM Level 2 Core for this test.</requirement>
  <content>

 <div xmlns="http://www.w3.org/1999/xhtml">

  <script type="text/javascript">
   <![CDATA[

    function test() {
      /* Microsoft specs for .indeterminate say that this is an invalid test
         as an element can be both .checked and .indeterminate; however the
         selectors spec says no element can be :checked:indeterminate. */
      document.getElementById("test").indeterminate = true;
    }

    window.setTimeout("test()", 100);
   ]]>
  </script>

  <p> <input id="test" type="checkbox" checked="checked"></input> This checkbox should have a green background. </p>

 </div>

</content>
  <source>
   <css>
 input { background: red; }
 input:not(:checked) { background: green; }
</css>
   <xml>

 &lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;

  &lt;script type=&quot;text/javascript&quot;&gt;
   &lt;![CDATA[

    function test() {
      /* Microsoft specs for .indeterminate say that this is an invalid test
         as an element can be both .checked and .indeterminate; however the
         selectors spec says no element can be :checked:indeterminate. */
      document.getElementById(&quot;test&quot;).indeterminate = true;
    }

    window.setTimeout(&quot;test()&quot;, 100);
   ]]&gt;
  &lt;/script&gt;

  &lt;p&gt; &lt;input id=&quot;test&quot; type=&quot;checkbox&quot; checked=&quot;checked&quot;&gt;&lt;/input&gt; This checkbox should have a green background. &lt;/p&gt;

 &lt;/div&gt;

</xml>
  </source>
</test>