Parsel: A tiny, permissive CSS selector parser

Lea Verou has released Parsel, a small utility that turns a CSS selector into an Abstract Syntax Tree (AST). It’s available now on her projects page.

For those who want that same AST treatment for an entire stylesheet, PostCSS already does that — it hit v8 this year. PostCSS itself performs no transformations; it builds the AST and hands it to plugins that do the actual work. The catch? Saying “We use PostCSS” is about as informative as saying “We use Sass” is, which is to say, not at all.