Internet Explorer 9 Project Manager Sharon Newman has revealed in depth the upcoming browsers support for CSS3 selectors.
“CSS3 Selectors enable complex styling of webpages using simpler CSS and less script than previously possible” wrote Newman.
“Our goal is to enable new selectors in your webpages in a way that lets the same markup work across browsers […] IE9 now passes 100% of test cases on css3.info, 100% of the W3C CSS3 Selectors Test Suite, and Acid3 tests 34 through 37 and 39 through 44” continued Newman.
Interested users can test out a developer preview of Internet Explorer 9 by downloading it from the test drive site.
A full list of CSS3 selectors supported by Internet Explorer 9 can be found after the break.
Internet Explorer 9 is set to include support for the following selectors:
- E:root
- E:nth-child(n)
- E:nth-last-child(n)
- E:nth-of-type(n)
- E:nth-last-of-type(n)
- E:last-child
- E:first-of-type
- E:last-of-type
- E:only-child
- E:only-of-type
- E:only-child
- E:only-of-type
- E:empty
- E:target
- E:enabled
- E:disabled
- E:checked
- E:indeterminate
- E:not(s)
- ::selection
Tiago Sá wrote on May 14, 2010 at 7:51 pm
Awesome news, awesome news! Now they can start contributing to future specs with their own ideas, like the rest of the grown ups.
Tiago Sá wrote on May 14, 2010 at 8:14 pm
Oh, by the way, ::selection is not CSS3. It’s their own proprietary pseudo-selector. I don’t know what it does. But it’s not CSS3.
Alex wrote on May 14, 2010 at 11:38 pm
The ::selection selector allows you to specifiy a text-color and background-color when you highlight text. It was in the original CSS3 draft specifications, but has since been removed. I believe it is supported by most of today’s modern browsers, despite no longer being a “standard”.
You can test it out on this page here: http://sixrevisions.com/css/css3-techniques-you-should-know/
Tiago Sá wrote on May 15, 2010 at 3:57 am
Oh, I know that one! It’s not supported, because it’s used with a prefix, since it’s non standard. Apparently Microsoft is using the same dudes who program paint to do IE, because they don’t know how to use prefixes for non-standard features… Tsee, it figures…
It should be ::mcs-selection.
Alex wrote on May 15, 2010 at 4:40 pm
Yes and no, WebKit browsers and Opera support it as simply ::selection, while Firefox uses the -moz- prefix.
I see no harm in Microsoft not using a prefix, and think in this case, despite having been removed from the CSS3 draft, Mozilla should drop the prefix to bring it into line with everyone else.
Tiago Sá wrote on May 16, 2010 at 11:27 pm
Hum… I didn’t know about that Alex. Thanks for letting me know.
Well, since everyone else is doing it without a prefix, I think little harm would come from Mozilla dropping the prefix. Still, it’s not a standard, and I think we shouldn’t compromise our principles just to go with the flow… If Mozilla’s principle is to prefix non-standard technology, I respect their decision of keeping to their ideals.