about standards, webdesign, usability and open source

The CSS selector test and IE 8 beta 1

Microsoft released the first beta of Internet Explorer 8 yesterday. There are lots of articles on the web discussing the changes they have made, so I won’t repeat any of the general comments. I will focus on the performance of IE 8 beta 1 in the CSS selector test.

If you look at IE 6 and 7 it is clear that Microsoft has a long way to go before it even comes close to the support that other browsers have for this technology. IE 6 was the worst of all the browsers and IE 7 was only marginally better.

Initially I was full of optimism. The IE team seemed to be pretty serious about standards support and IE 8 beta 1 even passes the Acid 2 test. Additionally I was pleasantly surprised that IE 8 beta 1 also has support for the Selector API which enables webpages to use CSS selectors from Javascript. Of course this API is only useful if there is proper support for the selectors themselves. There isn’t much use for an API to a seriously incomplete and buggy selector implementation.

So I figured that the IE team would have taken a close look at their CSS selector API and I was hoping for the best. Their commitment to full CSS 2.1 support was also increasing my expectations for this release.

Unfortunately, IE 8 beta 1 did not meet my expectations. IE 8 beta 1 seems closer to supporting the CSS 2.1 selectors, but it is still buggy and still only marginally better than IE 7. This is however not the last beta and the IE team will continue to work on completing their CSS 2.1 support. CSS 2.1 support is however not enough to pass the CSS selector test, which also includes selectors from the CSS 3 Selector module.

Browser Version Supported Buggy Unsupported Passed
Internet Explorer 6 10 1 32 276
Internet Explorer 7 13 4 26 330
Internet Explorer 8 beta 1 14 4 25 334
Opera 8.5.4 18 3 22 317
Safari 2.0.4 21 7 15 336
Firefox 1.0.8 24 9 10 352
Opera 9.0.2 25 3 15 346
Safari 3.04 25 9 9 346
Firefox 26 10 7 357
Firefox 26 10 7 357
Firefox 3 beta 3 32 4 7 369
Konqueror 3.5.4 37 6 0 570
Safari r30118 43 0 0 578
Opera 9.5 beta 1 43 0 0 578
Konqueror 3.5.6 43 0 0 578

So what did the IE team change between IE 7 and IE 8 beta 1?

  • Added support for :lang()
  • Added support for :before (but not the CSS 3 replacement ::before)
  • Added support for :after (but not the CSS 3 replacement ::after)
  • Fixing one bug in :first-child (one bug to go before passing this part of the test)
  • Dropped support for :first-letter
  • Dropped support for :first-line

The regression of :first-letter and :first-line seems particularly odd to me because those selectors were working perfectly in IE 7 and are now the only two selectors from the CSS 2.1 specification that are completely missing.

If the IE team has set their target to supporting just the CSS 2.1 selectors, they are almost done. They just need to restore their :first-letter and :first-line support and fix a number of small bugs.

However, if the IE team is serious about CSS selector support, they still have a long way to go, because their support for CSS 3 selectors is still non-existent in this beta.

2 Responses to “The CSS selector test and IE 8 beta 1”

  1. Anjanesh wrote on March 28th, 2008 at 5:28 pm

    No :focus in IE 8 ?

  2. MicroAngelo wrote on January 6th, 2009 at 2:19 pm


    Yes, IE8 finally supports :active, :hover and :focus – and on all elements! (In fact that’s pretty much the only improvement I can see, and in some other selectors they’ve gone backwards… c.f. first-letter & first-line support which worked in IE7 and even IE6)

    Microsoft are now only about a decade behind the rest of the browsers in terms of CSS support. Well done, guys!