Re: [csswg-drafts] [css-values] Proposal: add sibling-count() and sibling-index() (#4559)

>     animation-delay: calc( 2s * ( var(--sibling-index) / var(--sibling-count) ) );

This assumes that the index is 0-based. I would prefer it to be 1-based for consistency with nth-child.
Also, be aware that if you only have 1 child, you will have a 0/0 division.
I would argue that `index-1-based / parent-children-count` would be safer, and not getting 0 for the 1st child doesn't seem a big problem.

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

Received on Thursday, 5 December 2019 15:14:25 UTC