Parse a CSS3-like selector
This is the rather small subset of CSS3 that is supported:
CSS3-like selector string.
Type selectors, e.g.
Class selectors, e.g.
.indexselects any element that has a class of "index".
#tocwill match the element that has the ID "toc".
Descendant combinator, i.e. the space, that combinator selects nodes that are descendants of the first element. E.g.
div spanwill match all
<span>elements that are inside a