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

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 14 May 2007 15:46:18 -0500
Message-ID: <4648CA9A.3040202@mit.edu>
To: Christoph Päper <christoph.paeper@crissov.de>
CC: www-style CSS <www-style@w3.org>

Christoph Päper wrote:
> First off, |:first-letter| (and likewise a hypothetical |:last-letter| 
> selector) is a pseudo-class and not a pseudo-element

http://www.w3.org/TR/CSS21/selector.html#first-letter says:

   5.12.2 The :first-letter pseudo-element

It's been that way all along.

> 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.

No. Pseudo-classes allow selection (and styling) of existing DOM elements that 
have some property.  Pseudo-elements allow styling of things that don't have a 
corresponding DOM element (e.g. the first letter of a paragraph).  Generated 
content is a special case of something that doesn't have a DOM element.

Received on Monday, 14 May 2007 20:47:24 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:28 UTC