Fix PDF report: prevent table rows splitting across pages, allow sections to flow

- tr { page-break-inside: avoid } stops issue rows from breaking mid-row
- Remove page-break-inside: avoid from .section (was causing blank half-pages
  when Matterhorn table spilled just past a page boundary)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vadym Samoilenko 2026-03-12 19:09:11 +00:00
parent e0f961ffb9
commit 97641ba56c

View file

@ -331,11 +331,13 @@ def generate_pdf(data: dict) -> bytes:
.stat.critical .num, .stat.error .num {{ color: #dc2626; }}
.stat.warning .num {{ color: #d97706; }}
.stat.info .num {{ color: #3b82f6; }}
.section {{ margin-bottom: 24px; page-break-inside: avoid; }}
.section {{ margin-bottom: 24px; }}
.section h2 + table {{ page-break-before: avoid; }}
.section h2 {{ font-size: 13pt; font-weight: 700; border-bottom: 2px solid #FFC407; padding-bottom: 6px; margin-bottom: 12px; }}
table {{ width: 100%; border-collapse: collapse; font-size: 9pt; }}
th {{ background: #f5f4f1; padding: 6px 10px; text-align: left; font-weight: 700; font-size: 8pt; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid #ddd; }}
td {{ padding: 6px 10px; border-bottom: 1px solid #eee; vertical-align: top; }}
tr {{ page-break-inside: avoid; }}
.pass {{ color: #059669; font-weight: 700; }}
.fail {{ color: #dc2626; font-weight: 700; }}
.not-tested {{ color: #999; }}