W3C home > Mailing lists > Public > www-style@w3.org > August 2014

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 29 Aug 2014 08:20:44 +1000
Message-ID: <CAAWBYDBX0gEudG4BeCny7+rYtS2kNSRfTaD2hjbeyoRbqJFB3w@mail.gmail.com>
To: Simon Sapin <simon.sapin@exyr.org>
Cc: www-style list <www-style@w3.org>
On Fri, Aug 29, 2014 at 8:11 AM, Simon Sapin <simon.sapin@exyr.org> wrote:
> 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

We don't actually want to stop that anymore, though - we agreed to
lift the restriction of pseudo-elements always being at the end, and
depend on this for ::shadow to work.

We should probably just lift the restriction entirely.

~TJ
Received on Thursday, 28 August 2014 22:21:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:45 UTC