hscc

Soure code of <https://hugo.soucy.cc>.
git clone git://soucy.cc/hscc.git
Log | Files | Refs

commit 6b4f449c47cb0b63f1e24ad17f385294dc1bc73a
parent f18f624aa549d7ed96e6ce7288577c7b516a58e5
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Wed, 27 Oct 2021 19:07:54 -0400

Enhance print rules

Diffstat:
Msrc/css/print.css | 46+++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 41 insertions(+), 5 deletions(-)

diff --git a/src/css/print.css b/src/css/print.css @@ -1,27 +1,63 @@ -/* body * { display: none !important; } */ -/* body:after { content: "Don't waste paper!"; } */ - body { + background: #ffffff; + color: #000000; + font-family: Courier, "Courier New", monospace; font-size: 12pt; } +body, +article, +main { + margin: 0; + padding: 0; + width: 100%; +} + +body > aside, body > footer, body > header, body > nav { display: none; } -.main__aside, +h2, +h3 { + page-break-after: avoid; +} + +img { + max-width: 100% !important; +} + +dl > div, +ul, +img { + page-break-inside: avoid; +} + +.hresume > * + *:not(.h-card) { + border-top: 0; + padding-bottom: 0; + padding-top: 0; + margin-top: calc(var(--base-space) * 10); +} + .hentry__categories, .hentry__footer [rel] { display: none; } -/* target all pages */ @page { margin: 2cm; } +@media print and (color) { + * { + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + } +} + /* .print-mode__checkbox { */ /* display: none; */ /* } */