Re: [csswg-drafts] [selectors-4] New selector based on the amount of child elements (#5694)

Regarding complexity, we have (from hardest to easiest):
1. `:has()`
2. `:has-child(S) = :has(> :is(S))` (#4903)
3. `:nth-children(An+B of S) = :has-child(:nth-child(An+B of S):nth-last-child(1 of S))`
    (or maybe `= :is(:has-child(:nth-child(An+B of S):nth-last-child(1 of S)), :not(:has-child(S)))` if `B=0` or `A,B≠0, A∣B, A*B<0`)

So this one seems the most feasible, and `:has()` might be unfeasible (for the web, for now). But if `:has-child()` is feasible, I would prefer it over this one.

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


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

Received on Friday, 6 November 2020 00:59:23 UTC