W3C home > Mailing lists > Public > www-style@w3.org > April 2013

Re: [selectors4] :not and :matches specificity (was :not(a, b) vs. :not(a):not(b)

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 17 Apr 2013 15:10:20 -0700
Message-ID: <CAAWBYDA_taPci-7FCBgHaHAUXUKyTVrE8svZE4rWOPd=7oSVVA@mail.gmail.com>
To: Brian Kardell <bkardell@gmail.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, www-style list <www-style@w3.org>
On Wed, Apr 17, 2013 at 2:21 PM, Brian Kardell <bkardell@gmail.com> wrote:
> It seems to me that it would be really nice if all of these, at least the
> logical ones worked the same.
>
> It seems only (regardless of any impl constraints) treating with generic
> "pseudo specificity" or saying that the rule itself is subject to N
> specificities make sense in my mind.  I suppose max might have some
> sensibility, but it seems to me at odds with what you are trying to express.

The new :matches() behavior (use only the actual matched branches) is
obviously the correct route - it gives you the exact same specificity
as expanding the :matches() stuff out into a big list of selectors.

We can't apply the same to :not(), because it's nonsensical.  *None*
of the branches in a :not() are "taken", because if they are, the
selector doesn't match. ^_^

~TJ
Received on Wednesday, 17 April 2013 22:11:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 17 April 2013 22:11:12 UTC