rewriting CSS parser