W3C home > Mailing lists > Public > www-style@w3.org > October 2009

Re: [css3-selectors] minor question about :not()

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 19 Oct 2009 16:38:13 -0700
Message-ID: <4ADCF865.9010206@inkedblade.net>
To: Zack Weinberg <zweinberg@mozilla.com>
CC: Andrey Mikhalev <amikhal@abisoft.spb.ru>, W3C Emailing list for WWW Style <www-style@w3.org>
Andrey Mikhalev wrote:
 >
 > in 6.6.7:
 > "The negation pseudo-class, :not(X), is a functional notation
 > taking a simple selector (excluding the negation pseudo-class
 > itself and pseudo-elements) as an argument."
 >
 > so, :not(:pseudo-element) - allowed by formal grammar -
 > is invalid selector or "useless" selector, as foo:not(bar) ?

Zack Weinberg wrote:
> Daniel Glazman <daniel.glazman@disruptive-innovations.com> wrote:
>> So let me explain : according to section 4, a pseudo-element is not a
>> simple selector. It's then impossible to negate a pseudo-element.
> 
> Aha, but then there's still a wording problem: in
> 
>   a simple selector (excluding X and Y)
> 
> the parenthetical reads like it *modifies* "a simple selector"; i.e. it
> gives the impression that X and Y *are* simple selectors but are not
> permitted in this context.  I suggest just deleting the parenthetical
> or replacing it with a cross-reference to the actual definition.

I believe that these comments have been addressed by the latest
Editor's Draft <http://dev.w3.org/csswg/selectors3/#negation>:

   # The negation pseudo-class, :not(X), is a functional notation
   # taking a simple selector (excluding the negation pseudo-class
   # itself) as an argument. It represents an element that is not
   # represented by the argument.
   #
   # Note: Since pseudo-elements are not simple selectors, they
   # are not a valid argument to :not().

Please let me know if this addresses your comment.

~fantasai
Received on Monday, 19 October 2009 23:38:54 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:21 GMT