W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2020

Re: [csswg-drafts] [web-animations-1] Clarification about `target` and `pseudoElement` relationship (#4745)

From: Robert Flack via GitHub <sysbot+gh@w3.org>
Date: Tue, 10 Mar 2020 18:22:04 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-597239938-1583864522-sysbot+gh@w3.org>
> @flackr from the MDN page on querySelectorAll()
> > If the specified selectors include a CSS pseudo-element, the returned list is always empty.
> It doesn't sound like we have two conventions for pseudo-elements. We only have the getComputedStyle convention as querySelector doesn't support pseudo-elements at all. Even the section linked above on unsupported pseudo-element selectors being treated as invalid is only used in a context where an invalid selector means a no-op.

The context in which [querySelector](https://dom.spec.whatwg.org/#dom-parentnode-queryselector) runs [scope-match a selectors string](https://dom.spec.whatwg.org/#scope-match-a-selectors-string) which uses the [parse a selector](https://drafts.csswg.org/selectors-4/#parse-a-selector) from selectors-4 which states that [an unsupported psuedo-element selector is treated as invalid](https://drafts.csswg.org/selectors-4/#invalid-selector) throws an exception as a result of the invalid selector. It seems odd to me that we wouldn't have consistent pseudo element parsing.

GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4745#issuecomment-597239938 using your GitHub account
Received on Tuesday, 10 March 2020 18:22:05 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:02 UTC