Re: [csswg-drafts] [css-functions] enable the use of counter() inside calc()

Hi, ran into a case today where this would have helped, so posting a 
comment here. 

I'm setting up some CSS for an image/logo slider. While I know right 
now that there are 8 images, I don't know how many there will be in 
the future (nor do I wish to have to know).  I'm using only CSS to 
animate it, and it would be useful to be able to say "for each one of 
the items that exist (, increment this property by x." 
I ended up using sass to do something like this: 
```    
@for $i from 1 through 8 {  
    &:nth-of-type(#{$i}) {
        $delay: calc(5s * #{$i});
        animation: slideIn 45s linear $delay infinite;
    }
}

-- 
GitHub Notification of comment by MelSumner
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/1026#issuecomment-282523030
 using your GitHub account

Received on Sunday, 26 February 2017 00:28:48 UTC