Re: [csswg-drafts] [selectors-4]Why "Pseudo-elements cannot be represented by the matches-any pseudo-class"?

@tabatkins I don't say that elements and pseudo-element are _fundamentally_ different, and I like your interpretation of the `::` syntax as a "combinator", but in the same time I tend to see them as something conceptually close (though not the same, of course) to the elements from a different namespace. It's based on the fact that the usual universal selector (`*`) doesn't select pseudo-elements by default, so we have to list them explicitly like `*, *::before, *::after` (this is quite popular, for example, for changing the default `box-sizing` to `border-box` globally). And I assume that `:matches()` is equivalent to `*:matches()`, which leads me to conclusion that `element:matches(::pseudo-element)` should match nothing because a particular element and its particular pseudo-element can't be the same object.

And I like the idea of treating `::` as a combinator! It seems to be consistent with the concept of Shadow DOM combinators. Perhaps only "legacy" pseudo-elements with single colon syntax are the parsing issue in this case?

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

Received on Friday, 9 February 2018 11:49:18 UTC