W3C home > Mailing lists > Public > www-style@w3.org > May 2007

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

From: Adam <theoremic@googlemail.com>
Date: Mon, 14 May 2007 21:31:14 +0100
Message-ID: <4648C712.20103@gmail.com>
To: www-style@w3.org

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.

Adam

Christoph Päper wrote:
>
> mozer/Xmlizer:
>
> (Strange names parents are giving their children today.)
>
>> On 5/14/07, Adam <theoremic@googlemail.com> 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 GMT

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