From 4dd71c12404554053da2d78b3a3a7e0cba6335fe Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 6 Oct 2017 15:48:44 +1100 Subject: [PATCH] Add CSS workaround to display repeated table head Fixes https://github.com/openfoodfoundation/openfoodnetwork/issues/1738 --- app/assets/stylesheets/mail/email.css.scss | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/assets/stylesheets/mail/email.css.scss b/app/assets/stylesheets/mail/email.css.scss index 0b2f641b4f..10a16941dd 100644 --- a/app/assets/stylesheets/mail/email.css.scss +++ b/app/assets/stylesheets/mail/email.css.scss @@ -408,3 +408,12 @@ ul { display: inline-block; margin: 0px; } + +/* + * Fix overlapping table header on second page of long invoices. + * Problem description: https://github.com/openfoodfoundation/openfoodnetwork/issues/1738 + * Solution: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1770#issuecomment-73530576 + */ +thead { display: table-header-group } +tfoot { display: table-row-group } +tr { page-break-inside: avoid }