I found a very basic css parser in C++ that uses the LGPL that we may be able to extract in order to create our own simple css parser.
See
https://github.com/csstidy-c/csstidy...master/csstidy
It is all interlaced with code to compress/optimize the css which we do not need that will have to be stripped away and it all needs to be greatly simplified but it could form the basis for what we need.
It is the only state based css parser that does not depend on regular expressions to do the parsing.
I will take a stab at extracting and modifying it into something we can use.