- From: Anne van Kesteren (fora) <fora@annevankesteren.nl>
- Date: Sun, 30 May 2004 14:35:50 +0200
- To: Lachlan Hunt <lachlan.hunt@iinet.net.au>
- Cc: W3C CSS List <www-style@w3.org>, public-css-testsuite@w3.org
> 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).
Especially since ':first-letter' _does_ apply to '::before'. That would
lead to incosinstency between selectors, something you should avoid, imo.
>> Just to be sure, the following won't match, right?
>>
>> <test>&</test>
>>
>> test:contains('&'){ background:red }
>
>
> & is an HTML/XML entity, not a CSS entity, so it would not be
> converted to an ampersand while parsing the CSS. Therefore the selector
> would not match your test element. I expect that it would, however,
> match this:
> <test>&amp;</test>
That would be logical if the first has a 'red' background, which it
should have according to the XML parsing rules. I see authors, and maybe
implementors make mistakes with this though (Opera did) and therefore it
might be good to add it to the official test suite.
--
Anne van Kesteren
<http://annevankesteren.nl/>
Received on Sunday, 30 May 2004 08:36:29 UTC