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

> [...] it seems more appropriate to define these functions as keywords if they are not intended to accept arguments in the future.

Well `sibling-index` without ability to do **`sibling-index( *:not([hidden]) )`** would be pretty much useless *.

If the consistency with current "draconic" `:is()` is crucial, then enforcing explicit `*` for `sibling-index( * )` to avoid invalid (missing) argument is an option. It is true that it would make the purpose of the argument more clear, perhaps, but at this point I don't see it as a strong argument.

---

\*: such simple mechanism we can already emulate with custom properties and bunch of stupid repetition: `*:nth-child(1) { --child-index: 1; } *:nth-child(2) { --child-index: 2; } /* ad nauseam */` for `calc()` and/or `..-index: "1"` for `content` . 

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 15 March 2024 15:43:55 UTC