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

On Fri, Nov 30, 2012 at 10:14 AM, Rik Cabanier <cabanier@gmail.com> wrote:
> 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.

I've looked into doing something like this in the past.  I'm in favor
of some more powerful calc() stuff, and will definitely try to get
something like it into the next version of V&U.

~TJ

Received on Friday, 30 November 2012 18:28:40 UTC