Re: [csswg-drafts] [css-values] Proposal: `descendant-count()` function (#11069)

I don't see how your example uses this feature. If you're trying to accumulate a padding value as you nest, and you want to do it in one shot rather than actually accumulating, you need to count the *ancestors* that are uls, not how many *descendants* that are. As written, the *top-level* toc would have a huge padding, and then each nested toc section would have a gradually smaller padding.

I'd want to see some more realistic examples of using this before we considered it; it would definitely be more expensive than sibling-count() (which is already relatively expensive).

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


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

Received on Thursday, 24 October 2024 19:39:21 UTC