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 13:53:23 -0700
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
cc: www-style@w3.org
Message-ID: <20080218135323.34b83c2f3c9bef00757a2c62c0fb7450.b996206d1e.wbe@email.secureserver.net>

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.


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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:34 UTC