CSSUtilities (JavaScript Library for Querying CSS) Some faintly-written CSS on leaf-patterned paper, tied with string in the corner.

Version 0.99.1 Beta

Download a zipfile with the source code, developer’s guide, and a few demos:

These are the demos — a few simple tools that illustrate some different kinds of data and functionality the library can provide:

Live CSS Inspector
Click on any element to inspect its CSS rules
Get Specificity
Enter a CSS selector into the textbox, and get a simple visual representation of its specificity
Stylesheet Switching
See how the library can automatically re-initialize in response to stylesheet switching
Stylesheets Summary
Browse around a test <iframe> and get summary information about the stylesheets used on each page

Plus some more detailed technical demos, that illustrate each of the four primary design patterns you can use for getting data:

  1. Asynchronous with manual init
  2. Asynchronous with auto-init
  3. Synchronous with manual init
  4. Synchronous with auto-init

(See the Developer’s Guide in the zipfile for more about design patterns.)