Re:Show HN: Kerning.js — Take control of your web typography
by endtwist on Sunday September 18, 2011 @03:32PM
(#3011050)
I evaluated JSCSSP (didn't know about Parser-lib), but was trying to keep the file size down to a minimum.
Though perhaps not the most robust, the library I'm using now (http://bililite.com/blog/2009/01/16/jquery-css-parser/) seems to work fine with all of what I've thrown at it. It is also, by far, the smallest of the three CSS parsing libraries (14kb vs JSCSSP's 165kb).
I would recommend outsourcing your parsing though. It's a tough job and things like CSS hacks can really take your regexes for a loop.
I'd recommend trying out http://glazman.org/JSCSSP/ or https://github.com/nzakas/parser-lib/tree/master/src/css which Nicholas uses for CSSLint.