- From: Lachlan Hunt <lachlan.hunt@iinet.net.au>
- Date: Sun, 30 May 2004 22:45:38 +1000
- To: "Anne van Kesteren (fora)" <fora@annevankesteren.nl>
- Cc: W3C CSS List <www-style@w3.org>, public-css-testsuite@w3.org
Anne van Kesteren (fora) wrote: > >> Content generated with the ::before and ::after pseudo-elements does >> not actually modify the content of the element; only the way it is >> presented, and thus does not affect whether or not another selector >> matches. The background colour should be red. > > > I see. How about: > > > <test/> > > test{ background:red; > content:"PASS" } > test:contains('PASS'){ background:lime } > > > Personally, I don't see a difference here and I think that they all > should have a green background (which stands for PASS, obviously). That's right, there is no difference. The generated content doesn't actually affect the contents of the element in the document, only the way it is presented. Thus, they all should be red. What about this: <test>foo</test> test:contains('foo') { content: 'bar' } According to your logic, first the selector would match, the contents would be changed, then it would no longer match, so it would be changed back, then it would match again... -- Lachlan Hunt http://www.lachy.id.au/ lachlan.hunt@lachy.id.au
Received on Sunday, 30 May 2004 08:46:14 UTC