W3C home > Mailing lists > Public > www-style@w3.org > September 2006

[CSS3 Content] correcting an example

From: David Latapie <david@empyree.org>
Date: Thu, 28 Sep 2006 18:15:44 +0200
Message-Id: <D0380BD3-8EA3-44F8-9690-D6DF1B8E7A26@empyree.org>
To: www-style@w3.org

<http://www.w3.org/TR/css3-content/#inserting2>

> The following style sheet puts opening quotation marks on every  
> paragraph in a BLOCKQUOTE, and inserts a single closing quote at  
> the end:
> BLOCKQUOTE P:before     { content: open-quote }
> BLOCKQUOTE P:after      { content: no-close-quote }
> BLOCKQUOTE P.last:after { content: close-quote }
>
> This relies on the last paragraph being marked with a class "last",  
> since there are no selectors that can match the last child of an  
> element.

Since CSS3-selector has very high probability of being released  
before CSS3 Content, the example should be changed to

> The following style sheet puts opening quotation marks on every  
> paragraph in a BLOCKQUOTE, and inserts a single closing quote at  
> the end:
> BLOCKQUOTE P:before     { content: open-quote }
> BLOCKQUOTE P:after      { content: no-close-quote }
> BLOCKQUOTE P:last-child:after { content: close-quote }

<http://www.w3.org/TR/css3-selectors/#last-child-pseudo>

(I am not sure if it is possible to chain pseudo-classes and pseudo  
elements [:last-child:after])

-- 
</david_latapie>
http://blog.empyree.org/   U+0F00
Received on Thursday, 28 September 2006 16:15:52 GMT

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