[css3-selectors] :contains

I was wondering a bit about ':contains' [1]. What should be the 
background-color  in the following cases:


   <test/>

   test{                   background:red  }
   test::before{           content:"PASS"  }
   test:contains('PASS'){  background:lime }


   <test/>

   test{                   background:red  }
   test::before{           content:"PA"    }
   test::after{            content:"SS"    }
   test:contains('PASS'){  background:lime }


   <test>SS</test>

   test{                   background:red  }
   test::before{           content:"PA"    }
   test:contains('PASS'){  background:lime }


These cases could be extended with instances of ':hover', ':active', 
':focus' to make it more complex of course. Just to be sure, the 
following won't match, right?


   <test>&amp;</test>

   test:contains('&amp;'){ background:red  }


I think these issues need to be addressed in the selectors test suite as 
well.


[1] 
<http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#content-selectors>

-- 
  Anne van Kesteren
  <http://annevankesteren.nl/>

Received on Sunday, 30 May 2004 07:37:58 UTC