Bug fixes in css

I haven't yet fully reviewed all these new additions to the css code, so I don't know the extent of the changes, but I have encountered some critical bugs that break my app that uses it.

This pull request fixes infinite recursion bugs in two of the classes, there may be more that I have not yet encountered in my own use...