lol_html 1.2.1

Streaming HTML rewriter/parser with CSS selector-based API
Documentation
<!DOCTYPE html><html><head>
  <title>Syntax and parsing of unknown pseudo-classes and pseudo-elements</title>
  <style type="text/css">
  p { background: lime; }
  p   * { background: lime; }
  p > * { background: lime; }
  p + * { background: lime; }
  p ~ * { background: lime; }

  /* let's try some pseudos that are not valid CSS but are likely to
  be implemented as extensions in some UAs. These should not be
  recognised, as UAs implementing such extensions should use the
  :-vnd-ident syntax. */

  :canvas { background: red; }
  :viewport { background: red; }
  :window { background: red; }
  :menu { background: red; }
  :table { background: red; }
  :select { background: red; }
  ::canvas { background: red; }
  ::viewport { background: red; }
  ::window { background: red; }
  ::menu { background: red; }
  ::table { background: red; }
  ::select { background: red; }
</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 -->
  <meta name="flags" content=" interact">
 </head>
 <body>
 <p>This line should have a green background.</p>
 <p><!--Replaced (p + *) --></p>
 <table><!--Replaced (p + *) --></table>
 <!-- only allowed to be unstyled if + and ~ are not supported -->

</body></html>