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

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

From: Brad Kemper <brkemper.comcast@gmail.com>
Date: Thu, 16 Oct 2008 07:52:02 -0700
Cc: Ludger BŁnger <ludger.buenger@realobjects.com>, www-style@w3.org
Message-Id: <96E548E8-4851-475A-9A34-4E174F1586C5@gmail.com>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>


On Oct 16, 2008, at 5:51 AM, Daniel Glazman wrote:

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

So, you've removed the mention of ":after"? What about this:

p span:after {content: ", Daniel"}
p:first-line {color: #ffd800}

<p>Hi <i>there</i>. How are you? I am fine. Bla bla bla.</p>

Shouldn't the first line of that all be the same color, including the  
part generated after the span content? Your rewording seems to me to  
have removed that.
Received on Thursday, 16 October 2008 14:52:59 GMT

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