about standards, webdesign, usability and open source

Javascript based CSS selector compatibility tester

Joost de Valk let me know that I won the CSS3 summer contest over at css3.info. I created a Javascript based CSS selector compatibility tester. It surprised me a bit because I never thought my entry was a serious contender – it just created it to see if it could be done.

The basics turned out to be very simple to do, but getting it to work on more than one browser was a bit more work. The idea is that a small Javascript object loads a number of small standalone testcases in iframes and tests the embedded CSS is properly evaluated. It basically uses a CSS selector to set a background color and tests if the computed style contains the expected background color. It is also possible to do negative tests, which is also important to properly tests the behavoir browsers.

I’m still tweaking it a bit, but Joost will make the code public in a couple of days over at css3.info.

One Response to “Javascript based CSS selector compatibility tester”

  1. Philip Withnall wrote on October 5th, 2006 at 4:54 pm

    Congratulations! It sounds useful. :-)