lol_html 1.2.1

Streaming HTML rewriter/parser with CSS selector-based API
Documentation
<!DOCTYPE html><html><head>
  <title>Combinations: classes and IDs</title>
  <style type="text/css">
p { background: red; color: yellow; }
p:not(#other).class:not(.fail).test#id#id { background: green; color: white; }
div { background: green; color: white; }
div:not(#theid).class:not(.fail).test#theid#theid { background: red; color: yellow; }
div:not(#other).notclass:not(.fail).test#theid#theid { background: red; color: yellow; }
div:not(#other).class:not(.test).test#theid#theid { background: red; color: yellow; }
div:not(#other).class:not(.fail).nottest#theid#theid { background: red; color: yellow; }
div:not(#other).class:not(.fail).nottest#theid#other { background: red; color: yellow; }
</style>
  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
  <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"> <!-- bogus link to make sure it gets found -->
  <link rel="match" href="reference/this-line-green-background.xht">
  <meta name="flags" content="">
 </head>
 <body>
  <p id="id" class="class test">This line should be green.</p>
  <div id="theid" class="class test"><!--Replaced (div) --></div>

</body></html>