lol_html 1.2.1

Streaming HTML rewriter/parser with CSS selector-based API
Documentation
<html><head><!--[TEXT(':root:only-child')]-->
  <!--[/TEXT(':root:only-child')]--><title><!--[TEXT(':root:only-child')]-->Impossible rules (:root:first-child, etc)<!--[/TEXT(':root:only-child')]--></title><!--[TEXT(':root:only-child')]-->
  <!--[/TEXT(':root:only-child')]--><style type="text/css"><!--[TEXT(':root:only-child')]-->
:root:first-child { background-color: red; }
:root:last-child { background-color: red; }
:root:only-child { background-color: red; }
:root:nth-child(1) { background-color: red; }
:root:nth-child(n) { background-color: red; }
:root:nth-last-child(1) { background-color: red; }
:root:nth-last-child(n) { background-color: red; }
:root:first-of-type { background-color: red; }
:root:last-of-type { background-color: red; }
:root:only-of-type { background-color: red; }
:root:nth-of-type(1) { background-color: red; }
:root:nth-of-type(n) { background-color: red; }
:root:nth-last-of-type(1) { background-color: red; }
:root:nth-last-of-type(n) { background-color: red; }
p { color: green; }<!--[/TEXT(':root:only-child')]--></style><!--[TEXT(':root:only-child')]-->
  <!--[/TEXT(':root:only-child')]--><link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"><!--[TEXT(':root:only-child')]-->
  <!--[/TEXT(':root:only-child')]--><link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"><!--[TEXT(':root:only-child')]--> <!--[/TEXT(':root:only-child')]--><!--[COMMENT(':root:only-child')]--><!-- bogus link to make sure it gets found --><!--[/COMMENT(':root:only-child')]--><!--[TEXT(':root:only-child')]-->
  <!--[/TEXT(':root:only-child')]--><meta name="flags" content=""><!--[TEXT(':root:only-child')]-->
 <!--[/TEXT(':root:only-child')]--></head><!--[TEXT(':root:only-child')]-->
 <!--[/TEXT(':root:only-child')]--><body><!--[TEXT(':root:only-child')]-->
<!--[/TEXT(':root:only-child')]--><p><!--[TEXT(':root:only-child')]-->This line should be green (there should be no red on this page).<!--[/TEXT(':root:only-child')]--></p><!--[TEXT(':root:only-child')]-->

<!--[/TEXT(':root:only-child')]--></body></html>