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: Brian Birtles via GitHub <sysbot+gh@w3.org>
Date: Wed, 11 Mar 2020 02:56:34 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-597418682-1583895393-sysbot+gh@w3.org>
Yes, although I understand some pseudo-elements only have an effect on certain elements, I think the wording in selectors-4 refers to support independent of the target element,

> UAs must treat as invalid any pseudo-classes, pseudo-elements, combinators, or other syntactic constructs for which they have no usable level of support.

That is, we should throw here when the UA doesn't have any support for the pseudo-element, whatsoever, but not in the case when the UA does not support the specific pseudo-element and element combination (for that presumably there will simply be no effect).

That text also treats both parsing errors and unsupported pseudo-elements as the same class, "invalid", so I think we should throw for both cases rather than making a distinction here.

`querySelector` throws a `"SyntaxError"` for invalid selectors so I think we should do that here. (And checking in Firefox and Chrome, both throw for `document.querySelector('yer::yer')` but return null for `document.querySelector('yer::before')`)

-- 
GitHub Notification of comment by birtles
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4745#issuecomment-597418682 using your GitHub account
Received on Wednesday, 11 March 2020 02:56:36 UTC

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