W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2017

Re: [csswg-drafts] [css-values] Function to retrieve index of element among siblings, or counter on element as integer

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Fri, 27 Oct 2017 22:32:32 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-340112791-1509143551-sysbot+gh@w3.org>
If a specific `sibling-index()` function is added, I guess it could also accept an argument to be consistent with the <code>of <i>S</i></code> syntax of `:nth-child()`. For example, <code>sibling-index(<i>S</i>)</code> would return the (1-based) index of the current element among its inclusive siblings that match the selector list *S*. The problem is if the element does not match *S*, then maybe return 0.

GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1869#issuecomment-340112791 using your GitHub account
Received on Friday, 27 October 2017 22:32:34 UTC

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