- From: Zéfling <zefling@ikilote.net>
- Date: Wed, 03 Sep 2014 11:41:06 +0000
- To: www-style@w3.org
- Message-ID: <54064651.10604@ikilote.net> (sfid-20140903_114111_754702_A4398BC7)
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. ^_^; Zéfling
Received on Wednesday, 17 September 2014 15:52:05 UTC