mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
fix(exam): stop print margins doubling up, fitting far fewer questions per page
body had its own 40px padding + max-width:800px for the on-screen preview tab, which stacked with @page's own margin once actual printing kicked in — the preview tab never shows @page at all, so it looked like one continuous page while the real printed output wasted ~150px+ of page height per side and was capped to 800px wide regardless of the physical page width. In @media print specifically: padding:0, max-width:none — @page's margin is the only inset that should apply once printing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -294,7 +294,12 @@ export function ExamDetailPage() {
|
|||||||
never overlaps question text on the last page. */
|
never overlaps question text on the last page. */
|
||||||
@media print {
|
@media print {
|
||||||
@page { margin: 20mm 20mm 28mm 20mm; }
|
@page { margin: 20mm 20mm 28mm 20mm; }
|
||||||
body { -webkit-print-color-adjust: exact; padding-bottom: 0; }
|
/* @page's margin already insets content from the physical page
|
||||||
|
edge — body's own 40px padding (needed on-screen, for the
|
||||||
|
preview tab before printing) would double up with it here,
|
||||||
|
wasting real page height on every side and fitting noticeably
|
||||||
|
fewer questions per page than the paper actually has room for. */
|
||||||
|
body { -webkit-print-color-adjust: exact; padding: 0; max-width: none; }
|
||||||
.footer { position: fixed; bottom: 0; left: 0; right: 0; margin-top: 0; }
|
.footer { position: fixed; bottom: 0; left: 0; right: 0; margin-top: 0; }
|
||||||
}
|
}
|
||||||
</style></head><body>
|
</style></head><body>
|
||||||
|
|||||||
Reference in New Issue
Block a user