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

Daniel Glazman wrote:


> Alan Gresley wrote:
> 
> > Not quite true. IE7 was the first browser to correctly handle all attribute selectors.
> 
> This is a joke I presume ?
> 
> The first browser to implement all attribute selectors was MacIE 5.2,
> implementation was done by Tantek. Second was Mozilla, implementation
> was done by me.
> 
> </Daniel>


Opps. I only began learning CSS since Sep 2006 so I plead ignorance in that there is a big read on the internet, I haven't read much about MacIE 5.2 anyway since it is rarely used, and I don't have a Mac to test with :-(

Would anyone like to confirm how MacIE 5.2 handles my test pages.


I'm talking about supporting attribute selectors correctly. Opera 9.5 is the only browser that I know that passes all test "correctly". I don't test with any nightly builds but Gecko (all versions) fail with.

p[class*=""] {}


An author may temporary remove the value from a class attribute in the HTML

<p class="">...</p>


or it may not be under their control and some else across an intranet may have removed it. The above selector can style this element apart from Gecko. For Gecko I would need a new selector which no other browser uses.

p:not([class*=""]) {}


of course they could be grouped as

p[class*=""], p:not([class*=""]) {}


BTW, Safari 3 is case sensitive with attribute selectors.


Alan

http://css-class.com/

Received on Monday, 18 February 2008 20:53:44 UTC