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

I recently had the same discussion, and came to the realisation that the 
first letter itself is not an element, but part of the <p> element, for 
example. To me, this yields ::first-letter.

Aside from that, the specs say so themselves. But if you need a 
justification, that could be one; I know it worked for me.


Christoph Päper wrote:
> mozer/Xmlizer:
> (Strange names parents are giving their children today.)
>> On 5/14/07, Adam <> wrote:
>>> One immediate use I can think of for ::last-letter is pull-quotes. The
>>> opening quotation mark is easily created using ::first-letter, and I
>>> would say ::last-letter would introduce the equivalent ease for the
>>> closing quotation mark.
>> what about ::before and ::after ?
> 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.
> That is also why those are two completely different approaches to the 
> pull-quote example. Pseudo-classes do *not* generate the quotation 
> marks, but select them from the existing content to enable styling. 
> You can generate them -- well, sort of, they will not become real 
> content  -- with pseudo-elements and the |content| property.

Received on Monday, 14 May 2007 20:31:23 UTC