Background:
We had a request to provide some kind of option to allow for row groups to
avoid being split between pages (ref Grouping certain table rows on one page,
https://groups.google.com/forum/#!topic/dompdf/HfWt70SB0OU). The most obvious
solution is for the user to surround rows with a tbody element (multiple tbody
elements would define multiple row groups). The tbody element would then be
styled page-break-inside: avoid.
Defect:
page-break-inside: avoid is not honored for tbody elements. This might seem to
be appropriate, tbody is a grouping element and a table layout element
(http://www.w3.org/TR/html401/struct/tables.html#edef-TBODY). However, the
CSS2.1 spec allows for page-break-inside to be applied to "to other elements,
e.g., 'table-row' elements"
(http://www.w3.org/TR/CSS2/page.html#page-break-props).
Resolution:
Honor page-break styling on elements that behave similar to block-level
elements (e.g. tr, tbody, thead).
Original issue reported on code.google.com by eclecticgeek on 22 Dec 2011 at 7:37
Original issue reported on code.google.com by
eclecticgeek
on 22 Dec 2011 at 7:37