W3C home > Mailing lists > Public > www-style@w3.org > February 2008

RE: [css3] "Selectors that People Actually Use"

From: Alan Gresley <alan1@azzurum.com>
Date: Mon, 18 Feb 2008 17:04:51 -0700
To: Boris Zbarsky <bzbarsky@MIT.EDU>
cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, www-style@w3.org
Message-ID: <20080218170451.34b83c2f3c9bef00757a2c62c0fb7450.520c0bd7c5.wbe@email.secureserver.net>

Boris Zbarsky wrote:

> > p[class*=""], p:not([class*=""]) {}
> 
> That's equivalent to the selector "p".
> 
> -Boris


Correct but which is of greater specificity?


div {width: 100px;height:100px;background:red}
div[id*=""], div:not([id*=""]) {background:blue}


<body>

<div id="">....</div>

</body>

Browsers supporting negation will show a blue box. It's just that Gecko is out on a limb by itself.


Alan

http://css-class.com/
Received on Tuesday, 19 February 2008 00:05:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:01 GMT