Re: last-letter and last-line Pseudo-Elements

On Mon, 2007-14-05 at 22:25 +0200, Christoph Päper wrote:

> First off, |:first-letter| (and likewise a hypothetical |:last- 
> letter| selector) is a pseudo-class and not a pseudo-element and  
> therefore has only one colon (at least it was like that last time I  
> checked); |::before| and |::after| on the other hand are pseudo- 
> elements indeed.

No, :first-letter is pseudo-element. Pseudo-classes apply to DOM
elements which are in a specific state (mouse over it (:hover), focus on
it (:focus). 
However, if you would take for example:

p:first-letter{color: #abc; } 

:first-letter would apply to letter `L`, but it's just a letter not an
element. Therefore, the UA would do something like:
<p><pseudoelement>L</pseudoelement>orem</p> to apply styles to letter
`L`. Thus, :first-letter is a pseudo-element, not pseudo-class.

        Thank you for your time.
                Regards, Zoffix Znet
                ( , )

Received on Tuesday, 15 May 2007 01:56:55 UTC