W3C home > Mailing lists > Public > www-style@w3.org > November 2000

Re: pseudo-elements and *

From: Ian Hickson <ianh@netscape.com>
Date: Sat, 4 Nov 2000 16:52:00 -0800 (Pacific Standard Time)
To: fantasai <fantasai@escape.com>
cc: www-style@w3.org
Message-ID: <Pine.WNT.4.21.0011041650000.1004-100000@HIXIE.netscape.com>
On Sat, 4 Nov 2000, fantasai wrote:

> Does the universal selector (*) apply to pseudo-elements?

No, the universal selector does not match pseudo-elements.

> example - given the following
> 
> p::first-line {color: red}
> * {color: black !important}
> 
> Will the first line of each <p> be red or black?

Red, since the universal selector did not match and so the inherited black
would be overriden by the red.

To explicitly style every possible part of a document in CSS3, you must
use the following selector (assuming only CSS2 pseudos):

   *|*, *|*::before, *|*::after, *|*::first-line, *|*::first-letter

HTH,
-- 
Ian Hickson                                     )\     _. - ._.)       fL
Netscape, Standards Compliance QA              /. `- '  (  `--'
+1 650 937 6593                                `- , ) -  > ) \
irc.mozilla.org:Hixie _________________________  (.' \) (.' -' __________
Received on Saturday, 4 November 2000 19:52:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:06 GMT