- From: L. David Baron <dbaron@dbaron.org>
- Date: Sun, 30 May 2004 09:06:32 -0700
- To: W3C CSS List <www-style@w3.org>, public-css-testsuite@w3.org
- Message-ID: <20040530160632.GA3049@darby.dbaron.org>
On Sunday 2004-05-30 14:35 +0200, 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. > Personally, I don't see a difference here and I think that they all > should have a green background (which stands for PASS, obviously). This contradicts the entire model of CSS processing -- selectors are matched against the content, declarations from the matching rules are cascaded to determine the specified values, and then values are computed. Furthermore, I don't see a use case for your proposal. Generated content is unlikely to contain text like this since generated content should not be used for things that are essential to viewing the document (such as adding text). It should only be used for things that are stylistic (e.g., changing the list-numbering style). > Especially since ':first-letter' _does_ apply to '::before'. That would > lead to incosinstency between selectors, something you should avoid, imo. Pseudo-elements are very different from pseudo-classes. Pseudo-classes are just selectors: they affect whether an element matches the selector. Pseudo-elements are styling specific parts of an element, but the selector matching process for pseudo-elements essentially occurs without the pseudo-element. Also, cross-posting between www-style and public-css-testsuite is almost never the right thing to do, especially since the membership of the two lists is quite similar. This discussion belongs on www-style. -David -- L. David Baron <URL: http://dbaron.org/ >
Received on Sunday, 30 May 2004 12:07:05 UTC