W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2019

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

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Thu, 05 Dec 2019 15:14:23 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-562172796-1575558862-sysbot+gh@w3.org>
>     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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:57 UTC