Re: [csswg-drafts] [selectors-4] `x-pseudo-element` test is not documented in the selectors-4 spec (#6826)

There is nothing special about `::x-something-nobody-would-think-of`, it's invalid just like `::something-nobody-would-think-of`.

The test checks `::x-` specifically, because WebKit used to treat that as valid. https://bugs.webkit.org/show_bug.cgi?id=189089

> I saw discussion in another bug about how "::-webkit"-prefixed pseudo elements are only supported on webkit and invalidate the whole selector on other UAs

https://github.com/w3c/csswg-drafts/issues/3051#issuecomment-417027495 resolved that all `::-webkit-` pseudos are valid.

> Maybe the ::x- pseudo prefix could operate the same way, providing a mechanism for user-defined pseudo elements?

Author-defined pseudo-elements should probably use `::--`.

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


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

Received on Tuesday, 23 November 2021 22:51:15 UTC