W3C home > Mailing lists > Public > www-style@w3.org > December 1997

body:first-char and specificity of selectors

From: Neil St.Laurent <neil@bigpic.com>
Date: Wed, 17 Dec 1997 11:28:15 -0600
Message-Id: <199712171818.LAA01821@underworld.bigpic.com>
To: www-style@w3.org
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 GMT

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