Re: pseudo-elements and *

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 UTC