The sabberworm Weblog

PHP CSS Parser

06/10/2010

I’ve spent hours online looking for a CSS parser to use with PHP but all searches came up empty, half-assed or required me to register with some strange sites. Frustrated, I decided to write my own parser which is pretty much working but very incomplete. I don’t know whether this will be another write-once, update-never thing like much other PHP code on the web is but one feature id definitely coming: The ability to generate output from the parsed structure (which can be programmatically modified after parsing – or indeed have been created from scratch in PHP).

Some other features are planned as well but if no-one else is willing to work on them, them ever getting implemented will depend on whether I myself need them at some point.

Without much further ado; here it is: http://gist.github.com/433615.


Add a comment