title: Should CSS "orphan" operate at line or block level?
body: <p>I'm rendering HTML documents to PDF. Previously I was using <a href="https://code.google.com/p/wkhtmltopdf/" rel="nofollow">Wkhtmltopdf</a>, but it looks like <a href="https://github.com/dompdf/dompdf" rel="nofollow">Dompdf</a> offers better support for page breaks, so I expect I will switch to that.</p>
  
  <p>I'd like to apply some orphan control to my document, so I need to have a solid understanding of what <code>orphans</code> actually does. From W3C (<a href="http://www.w3.org/wiki/CSS/Properties/orphans" rel="nofollow">source</a>):</p>
  
  <blockquote>
    <p>The orphans property specifies the minimum number of lines in a block container that must be left at the bottom of a page. </p>
  </blockquote>
  
  <p>The example that is consistently offered around the web is this:</p>
  
  <pre><code>p { orphans: 3; }
  </code></pre>
  
  <p>This means that if there isn't space for three lines of paragraph text, a break is forced to the next page. I am rendering a document containing a lot of unordered lists, so for me it would be:</p>
  
  <pre><code>li { orphans: 2; }
  </code></pre>
  
  <p>However, I'd also ideally like to break an unordered list so that a bullet item block is not orphaned or widowed on its own. It would be nice to be able to do this:</p>
  
  <pre><code>ul { orphans: 2; }
  </code></pre>
  
  <p>That would ideally ensure that no item block could appear above or below a page break on its own. However browser/renderer support for this is patchy, and W3C above use the word "line" rather than "block". Thus, I imagine the above would just affect paragraph line control within list items, and would not affect whole list item blocks. If that is the case, is there a CSS way to do this?</p>