Re: [selectors4] :not(a, b) vs. :not(a):not(b)

On Mar 19, 2013 9:17 AM, "Peter Moulder" <peter.moulder@monash.edu> wrote:
>
> On Tue, Mar 19, 2013 at 10:27:32AM +0100, Simon Sapin wrote:
>
> > Selectors 4 extends :not() so its argument is a selector list. As I
> > read it, it’s just syntaxic sugar for multiple :not()
> > pseudo-classes. In other words, :not(a, b) is equivalent to
> > :not(a):not(b), just like not(a or b) is not(a) and not(b) in
> > boolean logic. Is this correct?
>
> They differ in specificity: :not(a):not(b) has the sum of the
specificities of
> a and b, while that of :not(a, b) is currently defined as the max of the
two.
>
> There's an issue open as to whether the specificity of :matches should
change
> from max specificity to something else, though that issue was raised
before
> :not was changed to take a selector list, so there isn't yet a
corresponding
> proposal as to how or whether the specificity of :not(a, b) might change
if
> that proposal for :matches(a, b) were to be adopted.
>
> > If so, it might be worth pointing out in the spec. Maybe in the
> > html|*:not(:link):not(:visited) example, by saying that it can also
> > be written html|*:not(:link, :visited)
>
> Nevertheless, that might still be a good idea, while noting the
difference in
> specificity.
>
> pjrm.
>

I think i've noted this in the past but that seems like a false choice
(specificity based on greatest).  It seems the choices should be between
simple pseudo specificity and multiply registering the same rule with
multiple specificities.

Received on Tuesday, 19 March 2013 13:22:29 UTC