Re: [selectors] Why is :matches() restricting pseudo-elements?

On 28/08/14 22:41, Benjamin Poulain wrote:
> Hi,
>
> The definition of :matches() has the following restriction:
> "Pseudo-elements cannot be represented by the matches-any
> pseudo-class; they are not valid within :matches().”.
>
> Can someone shed some light this restriction?
>
> Greping through some CSS, it seems quite common to have
> “something::after, something::before”, which could be written as
> "something:matches(::after, ::before)”. This seems like a useful
> capability.

I suppose we could lift that restriction when :matches() itself is at 
the end of the top-level selector.

What we want to restrict is things like :matches(::after) > div

-- 
Simon Sapin

Received on Thursday, 28 August 2014 22:11:26 UTC