Re: CSS3-selectors: Pseudo Elements only once or multiple times per selector?

Ludger BŁnger wrote:

> "When the ::first-letter and ::first-line pseudo-elements are combined 
> with ::before and ::after, they apply to the first letter or line of the 
> element including the inserted text."
> 
> Where is the mistake?

OOOOOHHH...
Ludger we're currently gong through a whole bunch of Selectors issue and
you found here not a selectors issue but a CSS 2 and 2.1 spec issue.

The prose in the CSS spec says:

   When the :first-letter and :first-line pseudo-elements are combined
   with :before and :after, they apply to the first letter or line of the
   element including the inserted text.

   Example(s):

   p.special:before {content: "Special! "}
   p.special:first-letter {color: #ffd800}

   This will render the "S" of "Special!" in gold.

So the wording of the 1st paragraph is entirely wrong ! It should read
something like "when content is added before an element through the
::before pseudo-element, the ::first-letter or ::first-line
pseudo-elements apply respectively to the first letter or line of the
::before content generated".

Thanks for the good catch, we're filing a CSS issue!

</Daniel>

Received on Thursday, 16 October 2008 12:52:13 UTC