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

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.
On Apr 17, 2013 3:45 PM, "fantasai" <fantasai.lists@inkedblade.net> wrote:

> On 03/19/2013 05:43 PM, Peter Moulder wrote:
>
>> On Tue, Mar 19, 2013 at 02:34:39PM +0100, Simon Sapin wrote:
>>
>>> Le 19/03/2013 14:14, Peter Moulder a écrit :
>>>
>>
>>  ...
>>>>
>>>
>>  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.
>>>>
>>>
>> Possibilities include:
>>
>>    1. Keeping as max (which would then become the only selector to use
>> max).
>>
>>    2. Same specificity as a pseudo-class.
>>
>>    3. change to sum, so that :not(a, b) would in fact have the same
>> specificity
>>       as :not(a):not(b).
>>
>>    4. Drop the list argument feature of :not.
>>
>
> Tab and I think the best thing to do here is go with the max. IMO this is
> actually the most natural interpretation. It also solves the problem of a
> chain of :not()s awkward increasing the specificity to some absurdly high
> amount, e.g.
>
>   :not(address):not(blockquote):**not(center):not(div):not(**
> figure):not(figcaption
>   ):not(footer):not(form):not(**header):not(hr):not(legend):**
> not(listing):not(main
>   ):not(p):not(plaintext):not(**pre):not(summary):not(xmp):**
> not(article):not(aside
>   ):not(h1):not(h2):not(h3):not(**h4):not(h5):not(h6):not(**
> hgroup):not(nav
>   ):not(section):not(table):not(**caption):not(colgroup):not(**
> col):not(thead
>   ):not(tbody):not(tfoot):not(**tr):not(td):not(th):not(dir):**
> not(dd):not(dl):not(dt
>   ):not(menu):not(ol):not(ul):**not(li)
>
> This is taken directly from the HTML5 spec. Note also the awkward wrapping,
> which is required here.
>
> We can't do #2 because it already introspects in Level 3. Options #3 and #4
> don't provide any added utility.
>
> ~fantasai
>
>

Received on Wednesday, 17 April 2013 21:22:26 UTC