W3C home > Mailing lists > Public > www-style@w3.org > October 2008

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

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Thu, 16 Oct 2008 14:51:31 +0200
Message-ID: <48F738D3.1070701@disruptive-innovations.com>
To: Ludger BŁnger <ludger.buenger@realobjects.com>
Cc: www-style@w3.org

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 GMT

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