MediaWiki library which implements a CSS tokenizer, parser and grammar matcher in PHP that mostly follows the CSS Syntax Module Level 3 candidate recommendation dated 20 February 2014, the CSS Values and Units Module Level 3, and the CSS Selectors Level 3 grammar.
It also provides a sanitizer that recognizes various CSS3 modules.
Code repository: rCSSS