You can use xpath for not XML documents, and well CSS is not XML. So if your styling is not in HTML attributes you cannot look for style(unless browser translates CSS styles to DOM attributes, then it could work, maybe someone will say something about this). My suggestion would be to use regexp to extract what ids/classes/tags have desired CSS attributes and then use those in xpath. However for this most likely you will need multi line regex mode(not that this is big problem, just a note).
Well actually now that I think of it you can do content search in style tags using xpath, but well you still need to parse that content, and I don't think you will do this successfully without regexp, so i suggest skipping regex in CSS parsing step. Or just use xpath to collect script elements and parse their content after that, so that you would not need to parse all HTML.