|
Posted by Harlan Messinger on 10/06/06 19:05
Eric B. Bednarz wrote:
> NoWhereMan <nowhereman@PLEASEDONTSPAMMEdespammed.com> writes:
>
>> are these css selectors legal ?
>>
>> .storycontent > p:first-child:first-letter{
>
>> .storycontent > p:first-child:first-line{
>
>> looks like syntactically valid (the w3c validator says it is) but is it
>> legal ?
>
> It looks suspicious
Why? Because it's redundant?
> but formally correct.
>
>> firefox interprets this as I suppose it should; opera does not :(
>
> The odds are that Opera does the right thing; you did not show the
> markup, and probably not the complete style sheet.
>
> So what's the value of P's first child's display property (hint)?
>
As with any of the pseudo-elements, it's pseudo. There isn't an element
there that has properties of its own, display or otherwise. Only if a
element specifier, to which a pseudo-element specifier is attached in a
selector, matches an element in the document does the UA act *as if*
there were an element possessing (only) the style properties that are
set. This is what happens in the case of
div.story:first-letter {
float: left;
font-size: 3em;
font-weight: bold;
}
At that point, the UA equally well act *as if* that pseudo-element has
pseudo-elements of its own, if a reference that could be interpreted
that way appear in a selector.
[Back to original message]
|