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

Alan Gresley wrote:
> 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}

The second selector has greater specificity.
(Probably it would be shorter to write
   div[id], div:not([id])
)

~fantasai

Received on Tuesday, 19 February 2008 01:30:35 UTC