W3C home > Mailing lists > Public > www-style@w3.org > November 2012

[css3-value] calc and child selectors (was: Proposal for Touch-Based Animation Scrubbing)

From: Rik Cabanier <cabanier@gmail.com>
Date: Fri, 30 Nov 2012 10:14:13 -0800
Message-ID: <CAGN7qDAmu5vHkb5qFOr4Zt2V=TaqPMdt-ZekM7-ikO1tMWAYeg@mail.gmail.com>
To: www-style list <www-style@w3.org>
Please disregard if this was already brought up.
While looking at Tab's proposal for an image carousel, I saw the following
idiom:

*.carousel > img:nth-child(1) { animation-delay: 1s; }*
*.carousel > img:nth-child(2) { animation-delay: 2s; }*
*...*
*
*

Could this be replaced with a new keyword for calc()?
For instance, if you want all the images under .carousel to turn one by
one, you could write:

*.carousel > img { animation-delay: calc(nth-child * 1s); }*
*
*

This new keyword would only be valid inside a child selector and return the
sibling order.
Received on Friday, 30 November 2012 18:14:41 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:03 GMT