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

Consistency with nth-child would be good.

On Thu, Dec 5, 2019 at 9:14 AM Oriol Brufau <notifications@github.com>
wrote:

> 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.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/w3c/csswg-drafts/issues/4559?email_source=notifications&email_token=AAF5XQ252NMNIU342LC5ZELQXELE7A5CNFSM4JVMOSQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGBBG7A#issuecomment-562172796>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAF5XQ7AEQWJPGJVVKOIZCLQXELE7ANCNFSM4JVMOSQA>
> .
>


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

Received on Thursday, 5 December 2019 15:16:33 UTC