Re: CSS4 Selectors (was Re: Extend use of namespaces)

Reading this I remembered some other issue: need for selecting last child  
having specified class. Something like:
.class:last-of-class
or more generally nth-of-class() and others.

I discovered this when I made a table with the levels of nesting and  
drawed tree nodes lines. I made simple solution using several tbody's with  
:last-of-type, but it isn't enough and useful only for one level of depth.

So here is an idea for another one CSS4 selector.


On Wed, 22 Sep 2010 00:33:47 +0400, Brad Kemper <brad.kemper@gmail.com>  
wrote:

> On Sep 21, 2010, at 12:16 PM, Aryeh Gregor <Simetrical+w3c@gmail.com>  
> wrote:
>
>>>> textarea, svg html textarea, svg html html textarea { ... }
>>>> svg textarea, svg svg textarea, svg svg svg textarea { ... }
>>>>
>>>> or something, for practical purposes.  But that's not acceptably
>>>> robust for UA stylesheets, I'd think.
>>>
>>> It's not acceptable for user sheets either, nor in my opinion for  
>>> author
>>> sheets.
>>
>> You're already forced to do stuff like this anyway in some cases.  For
>> instance, if you want to alternate between three styles of bullets for
>> <ul>,
>>
>> ul li { list-style-type: disc }
>> ul ul li { list-style-type: square }
>> ul ul ul li { list-style-type: circle }
>> ul ul ul ul li { list-style-type: disc }
>> ul ul ul ul ul li { list-style-type: square }
>> ul ul ul ul ul ul li { list-style-type: circle }
>> ul ul ul ul ul ul ul li { list-style-type: disc }
>> ul ul ul ul ul ul ul ul li { list-style-type: square }
>> ul ul ul ul ul ul ul ul ul li { list-style-type: circle }
>
> Maybe we need a 'nth-generation-of-type()' in CSS4 Selectors.

Received on Wednesday, 22 September 2010 15:44:51 UTC