4,431
edits
No edit summary |
No edit summary |
||
(20 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
/* =========================== | /* =========================== | ||
Softwear — Print | Softwear — A4 Narrow Print | ||
One-column ~half-A4 width | |||
(compact typography) | |||
=========================== */ | =========================== */ | ||
Line 25: | Line 26: | ||
font-family: 'HALColant-TextRegular', Georgia, "Times New Roman", serif; | font-family: 'HALColant-TextRegular', Georgia, "Times New Roman", serif; | ||
color: #292828 !important; | color: #292828 !important; | ||
background: #fff !important; | |||
} | } | ||
/* 4) Page | /* 4) Page & narrow column | ||
@page { size: | A4 portrait; 12mm outer margin. | ||
Content column = 93mm centered. | |||
*/ | |||
@page { size: A4 portrait; margin: 12mm; } | |||
.entry-wrapper.print- | .entry-wrapper.print-a4-narrow { | ||
box-sizing: border-box; | box-sizing: border-box; | ||
padding: | width: 93mm; /* ~half A4 minus gutter */ | ||
margin: 0 auto; /* center on page */ | |||
padding: 3mm; /* small inner padding */ | |||
} | } | ||
.entry-wrapper { | |||
/* 5) Titles & people */ | border: 1px solid; | ||
padding: 10px 10px; | |||
position: relative; | |||
} | |||
/* 5) Titles & people (COMPACT) */ | |||
.article-title { | .article-title { | ||
font-size: | font-size: 16px; | ||
line-height: | line-height: 18px; | ||
letter-spacing: 0. | letter-spacing: 0.5px; | ||
text-align: center; | text-align: center; | ||
margin: 0; | margin: 0; | ||
} | } | ||
.article-people { | .article-people { | ||
font-size: | font-size: 14px; | ||
line-height: | line-height: 18px; | ||
letter-spacing: 0. | letter-spacing: 0.4px; | ||
text-align: center; | text-align: center; | ||
text-decoration: underline; | text-decoration: underline; | ||
margin: 0; | margin: 0; | ||
padding-top: | padding-top: 6px; | ||
} | } | ||
.article-people a { text-decoration: underline; color: #292828 !important; } | .article-people a { text-decoration: underline; color: #292828 !important; } | ||
/* | /* === Hairline rules via pseudo-element (Blink) === */ | ||
.article-entry-number, | .article-entry-number, | ||
.link-pdf, | .link-pdf, | ||
Line 66: | Line 77: | ||
.article-quote, | .article-quote, | ||
.article-mod-line { | .article-mod-line { | ||
padding-bottom: | position: relative; | ||
border-bottom: 0. | padding-bottom: 6px; | ||
border-bottom: none !important; | |||
} | |||
.article-entry-number::after, | |||
.link-pdf::after, | |||
.article-type::after, | |||
.article-metadata::after, | |||
.article-images::after, | |||
.article-description::after, | |||
.article-reflection::after, | |||
.article-external-reference::after, | |||
.article-quote::after, | |||
.article-mod-line::after { | |||
content: ""; | |||
position: absolute; | |||
left: 0; right: 0; bottom: 0; | |||
height: 1px; | |||
background: #292828; | |||
transform: scaleY(0.5); | |||
transform-origin: 50% 100%; | |||
} | |||
/* === Firefox fallback: real thin border === */ | |||
@-moz-document url-prefix() { | |||
.article-entry-number::after, | |||
.link-pdf::after, | |||
.article-type::after, | |||
.article-metadata::after, | |||
.article-images::after, | |||
.article-description::after, | |||
.article-reflection::after, | |||
.article-external-reference::after, | |||
.article-quote::after, | |||
.article-mod-line::after { | |||
content: none !important; | |||
} | |||
.article-entry-number, | |||
.link-pdf, | |||
.article-type, | |||
.article-metadata, | |||
.article-images, | |||
.article-description, | |||
.article-reflection, | |||
.article-external-reference, | |||
.article-quote, | |||
.article-mod-line { | |||
border-bottom: 0.5pt solid #292828 !important; | |||
} | |||
#article-content > :last-child { border-bottom: 0 !important; } | |||
/* Add top spacer so first element isn't flush */ | |||
.entry-wrapper.print-a4-narrow::before, | |||
.entry-wrapper.print-a5::before, | |||
.print-only::before { | |||
content: ""; | |||
display: block; | |||
height: 6mm; /* match your @page top margin */ | |||
} | |||
html, body { | |||
margin: 0 !important; | |||
padding: 0 !important; | |||
} | |||
} | } | ||
/* 7) Entry number row */ | /* 7) Entry number row */ | ||
.article-entry-number { | .article-entry-number { | ||
font-size: | font-size: 12px; | ||
line-height: | line-height: 16px; | ||
margin: 0; | margin: 0; | ||
} | } | ||
Line 83: | Line 159: | ||
color: #292828 !important; | color: #292828 !important; | ||
text-decoration: none; | text-decoration: none; | ||
margin: | margin: 2px 0 0 0; | ||
padding-top: 0; | padding-top: 0; | ||
} | } | ||
Line 96: | Line 172: | ||
/* 9) Type line */ | /* 9) Type line */ | ||
.article-type { | .article-type { | ||
font-size: | font-size: 12px; | ||
line-height: 1 | line-height: 1.1; | ||
margin: 0; | margin: 0; | ||
padding-top: | padding-top: 4px; | ||
color: #292828 !important; | color: #292828 !important; | ||
} | } | ||
.article-type a { text-decoration: none; color: #292828 !important; } | .article-type a { text-decoration: none; color: #292828 !important; } | ||
/* 10) Metadata grid */ | /* 10) Metadata grid (COMPACT) */ | ||
.article-metadata, | .article-metadata, | ||
.article-metadata * { | .article-metadata * { | ||
Line 115: | Line 190: | ||
display: grid; | display: grid; | ||
grid-template-columns: repeat(3, 1fr); | grid-template-columns: repeat(3, 1fr); | ||
gap: | gap: 1.5mm; | ||
padding-top: | padding-top: 6px; | ||
line-height: 1 !important; | line-height: 1.05 !important; | ||
} | } | ||
.article-metadata-label { | .article-metadata-label { | ||
font-size: | font-size: 9px; | ||
text-transform: uppercase; | text-transform: uppercase; | ||
letter-spacing: 0.3px; | letter-spacing: 0.3px; | ||
} | } | ||
.article-metadata-value { | .article-metadata-value { | ||
font-size: | font-size: 11px; | ||
text-transform: capitalize; | text-transform: capitalize; | ||
} | } | ||
Line 133: | Line 208: | ||
} | } | ||
/* 11) Images */ | /* 11) Images (shorter to favor text) */ | ||
.article-metadata + .article-images { margin-top: 0 !important; padding-top: 0 !important; } | .article-metadata + .article-images { margin-top: 0 !important; padding-top: 0 !important; } | ||
.article-images { | .article-images { margin: 0 !important; padding-top: 0 !important; } | ||
} | |||
.article-images .image-container { | .article-images .image-container { | ||
display: inline-flex; | display: inline-flex; | ||
Line 149: | Line 221: | ||
.image-container img { | .image-container img { | ||
display: block; | display: block; | ||
max-height: 85mm | max-height: 60mm; /* was 85mm */ | ||
height: auto; | height: auto; | ||
width: auto; | width: auto; | ||
Line 161: | Line 233: | ||
margin: 0 !important; | margin: 0 !important; | ||
padding: 0 !important; | padding: 0 !important; | ||
line-height: 1 !important; | line-height: 1.1 !important; | ||
font-size: | font-size: 8px; /* smaller captions */ | ||
color: #555; | color: #555; | ||
text-align: left; | text-align: left; | ||
Line 169: | Line 241: | ||
.caption-image1:empty { display: none; } | .caption-image1:empty { display: none; } | ||
/* 12) Labels & bodies */ | /* 12) Labels & bodies (COMPACT) */ | ||
.article-label-description, | .article-label-description, | ||
.article-label-reflection, | .article-label-reflection, | ||
Line 176: | Line 248: | ||
.article-label-modification-date { | .article-label-modification-date { | ||
text-transform: uppercase; | text-transform: uppercase; | ||
margin: | margin: 6px 0 0 0 !important; | ||
padding: 0 !important; | padding: 0 !important; | ||
text-indent: | text-indent: 20px; | ||
line-height: 1; | line-height: 1.05; | ||
font-size: | font-size: 10px; | ||
letter-spacing: 0. | letter-spacing: 0.4px; | ||
break-after: avoid; page-break-after: avoid; | break-after: avoid; page-break-after: avoid; | ||
} | } | ||
Line 190: | Line 262: | ||
.article-external-reference + .article-label-quote, | .article-external-reference + .article-label-quote, | ||
.article-quote + .article-label-modification-date { | .article-quote + .article-label-modification-date { | ||
margin-top: | margin-top: 6px !important; | ||
} | } | ||
.article-description, | .article-description, | ||
Line 197: | Line 269: | ||
.article-quote, | .article-quote, | ||
.article-mod-line { | .article-mod-line { | ||
text-indent: | text-indent: 20px; | ||
line-height: 1. | line-height: 1.15; /* tighter */ | ||
font-size: 20px | font-size: 11.5px; /* down from 20px */ | ||
letter-spacing: 0. | letter-spacing: 0.4px; | ||
margin-top: 0 !important; | margin-top: 0 !important; | ||
padding-top: 0 !important; | padding-top: 0 !important; | ||
Line 212: | Line 284: | ||
} | } | ||
/* 13) Quote */ | /* 13) Quote (COMPACT) */ | ||
.article-quote { | .article-quote { | ||
font-size: | font-size: 13px; | ||
line-height | line-height: 1.2; | ||
font-style: italic; | font-style: italic; | ||
} | } | ||
Line 224: | Line 295: | ||
white-space: nowrap; | white-space: nowrap; | ||
color: grey; | color: grey; | ||
line-height: 1; | line-height: 1.05; | ||
font-size: | font-size: 10px; | ||
letter-spacing: 0. | letter-spacing: 0.3px; | ||
margin: | margin: 5px 0 0 0 !important; | ||
padding-top: | padding-top: 0 !important; | ||
} | } | ||
.article-mod-line > span { display: inline; margin: 0; padding: 0; } | .article-mod-line > span { display: inline; margin: 0; padding: 0; } | ||
.article-mod-line > span + span { margin-left: | .article-mod-line > span + span { margin-left: 4px; } | ||
.article-modification-date { font-size: | .article-modification-date { font-size: 11px; letter-spacing: 0.3px; } | ||
/* 15) Vector resets */ | /* 15) Vector resets */ | ||
Line 244: | Line 315: | ||
text-decoration: none; | text-decoration: none; | ||
color: #292828 !important; | color: #292828 !important; | ||
font-size: | font-size: 11px; /* smaller */ | ||
line-height: 1; | line-height: 1.15; | ||
letter-spacing: 0; | letter-spacing: 0; | ||
} | } | ||
Line 257: | Line 328: | ||
.article-metadata, | .article-metadata, | ||
.article-images { break-inside: avoid; page-break-inside: avoid; } | .article-images { break-inside: avoid; page-break-inside: avoid; } | ||
/* === Chrome/Blink-specific print overrides === */ | |||
@media print and (-webkit-min-device-pixel-ratio:0) { | |||
.article-label-description, | |||
.article-label-reflection, | |||
.article-label-external-reference, | |||
.article-label-quote, | |||
.article-label-modification-date { | |||
break-after: auto !important; | |||
page-break-after: auto !important; | |||
} | |||
.article-label-description + .article-description, | |||
.article-label-reflection + .article-reflection, | |||
.article-label-external-reference + .article-external-reference, | |||
.article-label-quote + .article-quote, | |||
.article-label-modification-date + .article-modification-date { | |||
break-before: auto !important; | |||
page-break-before: auto !important; | |||
} | |||
.article-description p, | |||
.article-reflection p, | |||
.article-external-reference p, | |||
.article-quote p { | |||
page-break-inside: avoid; | |||
break-inside: avoid; | |||
} | |||
} | |||
/* === FORCE narrow column on print (robust) === */ | |||
@media print { | |||
/* 1) Make sure the column itself is 93mm and centered */ | |||
.entry-wrapper.print-a4-narrow, | |||
.print-only.entry-wrapper, | |||
.print-only .entry-wrapper { | |||
width: 93mm !important; | |||
max-width: 93mm !important; | |||
margin-left: auto !important; | |||
margin-right: auto !important; | |||
box-sizing: border-box !important; | |||
} | |||
/* 2) If the wrapper class isn't present, fall back to constraining .print-only itself */ | |||
.print-only { | |||
width: 93mm !important; | |||
max-width: 93mm !important; | |||
margin-left: auto !important; | |||
margin-right: auto !important; | |||
box-sizing: border-box !important; | |||
} | |||
/* 3) Prevent descendants from stretching the width */ | |||
.print-only *, | |||
.entry-wrapper.print-a4-narrow * { | |||
max-width: 100% !important; | |||
} | |||
/* Common stretchers — make them auto width within the column */ | |||
.print-only .mw-body, | |||
.print-only .vector-body, | |||
.print-only .content, | |||
.print-only .list-container, | |||
.print-only table { | |||
width: auto !important; | |||
max-width: 100% !important; | |||
} | |||
/* Images never force the layout wider */ | |||
.print-only img { | |||
width: auto !important; | |||
max-width: 100% !important; | |||
height: auto !important; | |||
} | |||
} |