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

On Mar 12, 2009, at 2:25 PM, Eric A. Meyer wrote:

> At 8:40 PM +0300 3/12/09, 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) ?
>
>   Yes.  The limited scope of ':not()' has long bugged me.  It would  
> be really useful to be able to say something along the lines of  
> ':not(input, textarea, select, option) {margin: 0; padding: 0;}' --  
> thus allowing us to style all elements that are not form controls.  
> Yes, this most often comes up in resets, which some people don't  
> like, but there are other use cases besides just resets.
>   I sort of get excluding pseudo-elements, but being limited to a  
> simple selector is annoying and I don't quite see the point.
>
> -- 
> Eric A. Meyer (eric@meyerweb.com)     http://meyerweb.com/
>

I've never seen the point either.  WebKit actually allowed much more  
complex selectors inside :not and we've had to "dumb it down" in our  
latest nightlies to pass CSS tests and match other browsers.

dave
(hyatt@apple.com)

Received on Thursday, 12 March 2009 20:59:08 UTC