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

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 UTC