You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
page-break-before: always and page-break-after: always on a table row are ignored #591
CSS Fragmentation applies break-before and break-after to table rows. CSS 2.1 left rows to the user agent.
Cause.Tr::open() stores a row's break only when it is avoid (src/Tag/Tr.php:21-29). It maps page-break-after onto pagebreak-before of the next row. _tableWrite() reads the markers only to keep rows together (src/Mpdf.php:23184-23190).
Fix.
Store always (and left/right, as always) in the same pagebreak-before list, with after mapped onto the next row as now.
In _tableWrite(), when a row is marked, break the table before it with the same code an overflowing row uses, so the header and footer rows repeat.
Ignore a break before the first body row, and inside a nested table, where the outer table decides the breaks. Keep the !ColActive condition the avoid markers have.
#569 reads break-before: page as page-break-before: always, so rows get it once this lands. #576 does the same for page-break-before on the table itself.
Tests.always before and after a row, on a row in thead and in tfoot, on the first and the last row, in a nested table, and with a repeated header. Record which page each cell's text is drawn on.
Activity