CSS 3 Module <== Test # ==>
W3C Selectors 179 of 182
Testing Date Revision
NEGATED :indeterminate and :checked (ID #d5b) 2005-02-24 1.1

NOTE: The UA must support ECMA-262 and DOM Level 2 Core for this test.

Everything in this paragraph should have a green background.

 input, span { background: red; }
 input:not(:checked), input:not(:checked) + span { background: green; }

 <div>

  <script type="text/javascript">
   

    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"> <span>Everything in this paragraph should have a green background.</span> </p>

 </div>