Re: [csswg-drafts] [css-selectors] Allow relative selectors everywhere (#8010)

I don't think we should support top-level relative selectors. It's not immediately clear what they're relative *to*. If you say "the root", then (a) virtually nothing will ever successfully match, so it doesn't seem useful, and (b) the behavior for "implicit descendant combinator" relatives will be different anyway, since they can match the root.

Hammering on (a) a little more, unless you're doing some DOM shenanigans, then neither of the sibling combinators will ever match, and the child combinator will *only* let you match the `head` and `body` elements which are, again ignoring DOM shenanigans, unique anyway and thus didn't really need nesting anyway.

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


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

Received on Monday, 12 December 2022 21:43:02 UTC