limitation proposal of :nth-child

Hi,

Currently it is not possible to make all elements 1 to 10 on list with a 
selector. I think it could be interesting if one element of a series 
that have the same property without having to :nth-child (1), :nth-child 
(2), :nth-child (3), ... but something like this :
- :nth-child(n in (1 to 10))
- :nth-child(n in (1 to 10, 12 to 15))

______

Another thing, it would be nice to retrieve the index of an element 
(nth-child-index) to “modular” CSS, like this:

:root {
   --loadingAnimTime : 1.12s;
   --loadingAnimCount: 12;
}
..loading > span:nth-child(n in (1 to var(--loadingAnimCount))) {
   transform: rotate(calc( ( 360deg / var(--loadingAnimCount) ) * ( 
nth-child-index - 1 ) ));
   animation-delay: calc( ( var(--loadingAnimTime) / 
var(--loadingAnimCount) ) * ( nth-child-index - 1) );
}

Example :
http://ikilote.net/fr/Blog/Techno-magis/112.html (sorry, my article is 
in French)
Well, I'm sure this is too ambitious. ^_^;

Célian Veyssière

Received on Wednesday, 17 September 2014 15:52:36 UTC