Re: [CSS3 Selectors] proposal of pseudo-classes :odd-child and :odd-line

On Mon, 01 Oct 2007 14:59:55 +0200, Nikodem <nikn1@gazeta.pl> wrote:
> table tr:odd-child // similar to :first-child
> {
> background:gray
> }
>
> <table>
> <tr><td>Odd </td><td>Row</td></tr> <!-- has gray background -->
> <tr><td>Even</td><td>Row</td></tr>
> <tr><td>Odd </td><td>Row</td></tr> <!-- has gray background -->
> <tr><td>Even</td><td>Row</td></tr>
> </table>

How is this different from :nth-child(odd) or :nth-child(even)?


> pre:odd-line // similar to :first-line
> {
> background:grey
> }
>
> <pre>
> Odd  line <!-- has gray background -->
> Even line
> Odd  line <!-- has gray background -->
> Even line
> </pre>

This would be a pseudo-element I assume? Although I agree it's useful,  
it's quite expensive too. (See also the archives for similar proposals.  
::line etc.)


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Monday, 1 October 2007 13:09:51 UTC