Re: [csswg-drafts] [css-scoping] [selectors] :scope and DocumentFragment / ShadowRoot (#7261)

Reading the Selectors4 spec, it looks to me that :scope always matches a true element, even if the scoping root can be a Document or a DocumentFragment/ShadowRoot? Am I reading it correctly?

https://drafts.csswg.org/selectors-4/#the-scope-pseudo says afaict that :scope must match an element?

If so, point 2. Document.querySelectorAll(":scope > *") should return body/head because the scoping root is not an Element, hence falling back to the document root element?


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


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

Received on Monday, 9 May 2022 16:51:03 UTC