body:first-char and specificity of selectors

Implementing a style tree somethint quickly came to mind about 
pseudo-classes / pseudo-elements.  If the current pseudo-element is 
:first-line does the inhertied value come from the parent's style, or 
the parent's style if it were a first-line?

Example:

BODY { color: red }
BODY:first-line { color: blue }
EM:first-char { font-size: bigger }
...

<BODY>
<P>Hello this is some text.  Is the first-line of this text red or 
blue?  And also, does <EM>First-char</EM> work anywhere, or does it 
only apply to the first character of each new block level element?

I'm thinking that BODY:first-line is a pointless pseudo-element and 
nothing will ever consider its properties?

Which is of a higher specificity:

P:first-char EM
or
P EM:first-char
?

That is, which would be applied to
<P><EM>Hey!</EM>


Or what if I add to the styles:
BODY P  :first-char
or
P ~ EM
or
EM EM:first-char

I'm trying to find a definitive way to find specificity of the 
selectors, but it appears not to be trivial as I hoped...

__
| Mortar: Advanced Web Development <http://mortar.bigpic.com/>
| Neil St.Laurent                  <mailto:stlaurent@bigpic.com>
| Big Picture Multimedia

Received on Wednesday, 17 December 1997 13:22:08 UTC