David Baron's Weblog

New selectors

Tuesday, 2008-06-03, 15:20 -0700

I landed support for a few new CSS selectors yesterday. They're in today's new mozilla-central nightly build (destined for the Firefox release that might be called 3.1). We now support :nth-child(), :nth-last-child(), :nth-of-type(), and :nth-last-of-type() (see bug report) and :first-of-type, :last-of-type, and :only-of-type (see bug report). I think this means we support all of css3-selectors except for ::selection (although we have a buggy ::-moz-selection implementation). This gets us two additional points on Acid3 (tests 39 and 40).

Jeff Walden also landed a fix for our handling of test 68 on Acid3, which gets us one more point, and lets us view the results (by Shift-Clicking on the "A") without the result string being corrupted.

I'm hoping to finish up work on Media Queries soon as well.