MediaWiki:Print.css: Difference between revisions

From softwear.directory
Jump to navigation Jump to search
No edit summary
No edit summary
 
(106 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* --- Load custom print font --- */
/* ===========================
  Softwear — A4 Narrow Print
  One-column ~half-A4 width
  (compact typography)
  =========================== */
 
/* 1 Font face */
@font-face {
@font-face {
   font-family: 'HALColant-TextRegular';
   font-family: 'HALColant-TextRegular';
Line 9: Line 15:
}
}


/* 2 Print color fidelity */
* { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
* { -webkit-print-color-adjust: exact; print-color-adjust: exact; }


/* Global print baseline */
/* 3 Base visibility & typography */
.print-only { display: block !important; }
.print-only { display: block !important; }


/* Use the font everywhere in print */
html, body {
html, body {
   margin: 0;
   margin: 0;
   padding: 0;
   padding: 0;
   font-family: 'HALColant-TextRegular', Georgia, "Times New Roman", serif;
   font-family: 'HALColant-TextRegular', Georgia, "Times New Roman", serif;
   color: #111;
   color: #292828 !important;
  background: #fff !important;
}
}


/* A5 page setup */
/* 4 Page & narrow column
@page {
      A4 portrait; 12mm outer margin.
    size: A5 portrait;  
      Content column = 93mm centered.
    margin: 2.5mm;
*/
}  /* minimal outside margin for Chrome defaults */
@page { size: A4 portrait; margin: 12mm; }
.entry-wrapper.print-a5 { padding: 2.5mm; }  /* inner breathing room */
 
html, body { margin: 0; padding: 0;}


/* Main wrapper for the printable entry */
.entry-wrapper.print-a4-narrow {
.entry-wrapper.print-a5 {
  width: 100%;
   box-sizing: border-box;
   box-sizing: border-box;
   /* remove forced page break to avoid a blank trailing page on single prints */
   width: 93mm;               
   /* page-break-after: always; */
  margin: 0 auto;             
  padding: 3mm;             
 
}
.entry-wrapper {
  border: 1px solid;
  padding: 10px 10px;
  position: relative;
}
.print-no-border .entry-wrapper {
  border: none !important;
}
/* 5 Titles & people (COMPACT) */
.article-title {
  font-size: 16px;
   line-height: 18px;
  letter-spacing: 0.5px;
  text-align: center;
  margin: 0;
}
}
.article-people {
  font-size: 14px;
  line-height: 18px;
  letter-spacing: 0.4px;
  text-align: center;
  text-decoration: underline;
  margin: 0;
  padding-top: 6px;
}
.article-people a { text-decoration: underline; color: #292828 !important; }


/* Avoid splitting key sections across pages */
/* === Hairline rules via pseudo-element (Blink) === */
#article-title,
.article-entry-number,
.article-title-link,
.link-pdf,
.article-type,
.article-metadata,
.article-images,
.article-images,
.article-metadata,
.article-description,
.article-description,
.article-reflection,
.article-reflection,
.article-external-reference,
.article-external-reference,
.article-quote {
.article-quote,
   page-break-inside: avoid;
.article-mod-line {
   break-inside: avoid;
   position: relative;
  padding-bottom: 6px;
   border-bottom: none !important;
}
}


/* Typography & spacing for the print layout */
.article-entry-number::after,
body { font-family: HALColant-TextRegular!important; color: #292828!important;}
.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%;
}


.article-title {  
.link-pdf a {
    font-size: 22px;
  text-decoration: none!important;
    line-height: 24px;
    letter-spacing: 0.8px;
    text-align: center;
    color: #292828!important;
    margin: 0;
}
}
.article-people {  
/* === Firefox fallback: real thin border === */
     font-size: 22px;
@-moz-document url-prefix() {
     line-height: 28px;
  .article-entry-number::after,
    letter-spacing: 0.8px;
  .link-pdf::after,
     text-align: center;
  .article-type::after,
     text-decoration: underline;
  .article-metadata::after,
     color: #292828!important;
  .article-images::after,
     margin: 0;
  .article-description::after,
     padding-top: 15px;
  .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;
  }
}
}


.article-people a {
    text-decoration: underline;
    color: #292828!important;
}


/* 7 Entry number row */
.article-entry-number {
.article-entry-number {
    font-size: 16px;
  font-size: 12px;
    line-height: 23px;
  line-height: 16px;
    letter-spacing: 0;
  margin: 0;
    margin: 0;
    padding-bottom: 4px;
    border-bottom: none;
 
    background-image: linear-gradient(#000, #000);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 0.5px; 
}
}


/* 8 Centered link row ([PDF⤴] [WEB⤴]) */
.link-pdf {
.link-pdf {
    text-align: center;
  text-align: center;
    color: #292828!important;
  color: #292828 !important;
    text-decoration: none;
  text-decoration: none;
 
  margin: 2px 0 0 0;
    margin-top: 4px;
  padding-top: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
 
    background-image: linear-gradient(#000, #000);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 0.5px;  
}
}
.link-pdf a, .link-pdf p {
.link-pdf a, .link-pdf p {
    text-decoration: none;
  display: inline-block;
    display: inline-block; 
  text-decoration: none;
    color: #292828!important;
  color: #292828 !important;
    margin-top: 0!important;
  margin: 0 !important;
  padding: 0 !important;
}
}


.article-type {  
/* 9 Type line */
    font-size: 16px;
.article-type {
    line-height: 23px;
  font-size: 12px;
    letter-spacing: 0;
  line-height: 1.1;
    margin-top: 4px!important;
  margin: 0;
    padding-bottom: 3px!important;
  padding-top: 4px;
    text-decoration: none;
  color: #292828 !important;
    color: #292828!important;
 
    border-bottom: none;
    background-image: linear-gradient(#000, #000);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 0.5px; 
}
}
.article-type a { text-decoration: none; color: #292828 !important; }


.article-type a {
/* 10 Metadata grid (COMPACT) */
    text-decoration: none;
.article-metadata,
    display: inline-block;
.article-metadata * {
    color: #292828!important;
  margin: 0 !important;
  border: none;
  background: none;
}
}
.article-metadata {
.article-metadata {
    display: grid;
  display: grid;
    grid-template-columns: repeat(3, 1fr);
  grid-template-columns: repeat(3, 1fr);
    gap: 2mm;
  gap: 1.5mm;
    margin: 0!important;
  padding-top: 6px;
    padding: 0!important;
  line-height: 1.05 !important;
 
}
    border-bottom: none;
.article-metadata-label {
    background-image: linear-gradient(#000, #000);
  font-size: 9px;
    background-repeat: no-repeat;
  text-transform: uppercase;
    background-position: 0 100%;
  letter-spacing: 0.3px;
    background-size: 100% 0.5px;  
}
}
.article-metadata-column {
.article-metadata-value {
    margin: 0!important;
  font-size: 11px;
    padding: 0!important;
  text-transform: capitalize;
}
}
 
.article-metadata-value a {
.article-metadata-column p, .article-metadata-column a{
  color: #292828 !important;
    margin-top: 0!important;
  text-decoration: none;
    margin-bottom: 0!important;
    padding-top: 0!important;
    padding-bottom: 0!important;
}
}


.article-metadata-label {  
/* 11 Images (shorter to favor text) */
    text-transform: uppercase;
.article-metadata + .article-images { margin-top: 0 !important; padding-top: 0 !important; }
    font-size: 14px;
.article-images { margin: 0 !important; padding-top: 0 !important; }
    line-height: 18px;
.article-images .image-container {
    letter-spacing: 0.2px;
  display: inline-flex;
    margin-top: 0!important;
  flex-direction: column;
    margin-bottom: 0!important;
  align-items: flex-start;
    padding-top: 0important;
  margin: 0 !important;
    padding-bottom: 0!important;
  padding: 0 !important;
}
}
.article-metadata-value {  
.article-images .image-container img,
    text-transform: capitalize;
.image-container img {
    font-size: 14px;
  display: block;
    line-height: 16px;
  max-height: 60mm;   /* was 85mm */
    letter-spacing: 0.4px;  
  height: auto;
    margin-top: 0!important;
  width: auto;
    padding-top: 0!important;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain;
  line-height: 0;
}
}
 
.caption-image1 {
.article-metadata-value a {  
  margin: 0 !important;
    text-decoration: none;  
  padding: 0 !important;
     color: #292828!important;
  line-height: 1.1 !important;
    margin-top: 0!important;
  font-size: 8px;     /* smaller captions */
  color: #555;
  text-align: left;
  width: 100%;
}
}
.article-images .image-container { text-align: center; margin: 6mm 0; }
.caption-image1:empty { display: none; }
.article-images img { max-width: 100%; height: auto; }
.caption-image1 { font-size: 8pt; color: #555; margin-top: 2mm; }


/* 12 Labels & bodies (COMPACT) */
.article-label-description,
.article-label-description,
.article-label-reflection,
.article-label-reflection,
Line 194: Line 253:
.article-label-quote,
.article-label-quote,
.article-label-modification-date {
.article-label-modification-date {
   font-weight: bold;
   text-transform: uppercase;
   margin: 4mm 0 1.5mm;
   margin: 6px 0 0 0 !important;
   font-size: 9pt;
  padding: 0 !important;
  text-indent: 20px;
  line-height: 1.05;
   font-size: 10px;
  letter-spacing: 0.4px;
  break-after: avoid; page-break-after: avoid;
}
.article-metadata + .article-label-description,
.article-images + .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 {
  margin-top: 6px !important;
}
}
.article-description,
.article-description,
Line 202: Line 274:
.article-external-reference,
.article-external-reference,
.article-quote,
.article-quote,
.article-modification-date {
.article-mod-line {
   font-size: 10pt;
  text-indent: 20px;
   line-height: 1.35;
  line-height: 1.15;  /* tighter */
  font-size: 11.5px;    /* down from 20px */
  letter-spacing: 0.4px;
  margin-top: 0 !important;
  padding-top: 0 !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: avoid; page-break-before: avoid;
}
 
/* 13 Quote (COMPACT) */
.article-quote {
   font-size: 13px;
   line-height: 1.2;
  font-style: italic;
}
 
/* 14 Mod line */
.article-mod-line {
  white-space: nowrap;
  color: grey;
  line-height: 1.05;
  font-size: 10px;
  letter-spacing: 0.3px;
  margin: 5px 0 0 0 !important;
  padding-top: 0 !important;
}
}
.article-mod-line > span { display: inline; margin: 0; padding: 0; }
.article-mod-line > span + span { margin-left: 4px; }
.article-modification-date { font-size: 11px; letter-spacing: 0.3px; }


/* Don’t append raw URLs in print */
/* 15 Vector resets */
.vector-body p { margin: 0 !important; padding: 0 !important; }
 
/* 16 Links */
a[href]:after { content: none !important; }
a[href]:after { content: none !important; }
/* Wrap long links gracefully */
.article-external-reference a {
.article-external-reference a {
   word-break: break-word;
   word-break: break-word;
   overflow-wrap: anywhere;
   overflow-wrap: anywhere;
  text-decoration: none;
  color: #292828 !important;
  font-size: 11px;  /* smaller */
  line-height: 1.15;
  letter-spacing: 0;
}
/* 17 Page control */
#article-content { orphans: 2; widows: 2; }
/* 18 Prevent bad splits */
#article-title,
.article-title-link,
.article-metadata,
.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;
  }
}
}

Latest revision as of 06:34, 29 August 2025

/* ===========================
   Softwear — A4 Narrow Print
   One-column ~half-A4 width
   (compact typography)
   =========================== */

/* 1 Font face */
@font-face {
  font-family: 'HALColant-TextRegular';
  src: url('/fonts/HALColant-TextRegular.woff2?v=20250820') format('woff2'),
       url('/fonts/HALColant-TextRegular.woff?v=20250820')  format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* 2 Print color fidelity */
* { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* 3 Base visibility & typography */
.print-only { display: block !important; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'HALColant-TextRegular', Georgia, "Times New Roman", serif;
  color: #292828 !important;
  background: #fff !important;
}

/* 4 Page & narrow column
      A4 portrait; 12mm outer margin.
      Content column = 93mm centered.
*/
@page { size: A4 portrait; margin: 12mm; }

.entry-wrapper.print-a4-narrow {
  box-sizing: border-box;
  width: 93mm;                 
  margin: 0 auto;              
  padding: 3mm;               
  
}
.entry-wrapper {
  border: 1px solid;
  padding: 10px 10px;
  position: relative;
}
.print-no-border .entry-wrapper {
  border: none !important;
}
/* 5 Titles & people (COMPACT) */
.article-title {
  font-size: 16px;
  line-height: 18px;
  letter-spacing: 0.5px;
  text-align: center;
  margin: 0;
}
.article-people {
  font-size: 14px;
  line-height: 18px;
  letter-spacing: 0.4px;
  text-align: center;
  text-decoration: underline;
  margin: 0;
  padding-top: 6px;
}
.article-people a { text-decoration: underline; color: #292828 !important; }

/* === Hairline rules via pseudo-element (Blink) === */
.article-entry-number,
.link-pdf,
.article-type,
.article-metadata,
.article-images,
.article-description,
.article-reflection,
.article-external-reference,
.article-quote,
.article-mod-line {
  position: relative;
  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%;
}

.link-pdf a {
  text-decoration: none!important;
}
/* === 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 */
.article-entry-number {
  font-size: 12px;
  line-height: 16px;
  margin: 0;
}

/* 8 Centered link row ([PDF⤴] [WEB⤴]) */
.link-pdf {
  text-align: center;
  color: #292828 !important;
  text-decoration: none;
  margin: 2px 0 0 0;
  padding-top: 0;
}
.link-pdf a, .link-pdf p {
  display: inline-block;
  text-decoration: none;
  color: #292828 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 9 Type line */
.article-type {
  font-size: 12px;
  line-height: 1.1;
  margin: 0;
  padding-top: 4px;
  color: #292828 !important;
}
.article-type a { text-decoration: none; color: #292828 !important; }

/* 10 Metadata grid (COMPACT) */
.article-metadata,
.article-metadata * {
  margin: 0 !important;
  border: none;
  background: none;
}
.article-metadata {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5mm;
  padding-top: 6px;
  line-height: 1.05 !important;
}
.article-metadata-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.article-metadata-value {
  font-size: 11px;
  text-transform: capitalize;
}
.article-metadata-value a {
  color: #292828 !important;
  text-decoration: none;
}

/* 11 Images (shorter to favor text) */
.article-metadata + .article-images { margin-top: 0 !important; padding-top: 0 !important; }
.article-images { margin: 0 !important; padding-top: 0 !important; }
.article-images .image-container {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 !important;
  padding: 0 !important;
}
.article-images .image-container img,
.image-container img {
  display: block;
  max-height: 60mm;   /* was 85mm */
  height: auto;
  width: auto;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain;
  line-height: 0;
}
.caption-image1 {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.1 !important;
  font-size: 8px;     /* smaller captions */
  color: #555;
  text-align: left;
  width: 100%;
}
.caption-image1:empty { display: none; }

/* 12 Labels & bodies (COMPACT) */
.article-label-description,
.article-label-reflection,
.article-label-external-reference,
.article-label-quote,
.article-label-modification-date {
  text-transform: uppercase;
  margin: 6px 0 0 0 !important;
  padding: 0 !important;
  text-indent: 20px;
  line-height: 1.05;
  font-size: 10px;
  letter-spacing: 0.4px;
  break-after: avoid; page-break-after: avoid;
}
.article-metadata + .article-label-description,
.article-images + .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 {
  margin-top: 6px !important;
}
.article-description,
.article-reflection,
.article-external-reference,
.article-quote,
.article-mod-line {
  text-indent: 20px;
  line-height: 1.15;   /* tighter */
  font-size: 11.5px;     /* down from 20px */
  letter-spacing: 0.4px;
  margin-top: 0 !important;
  padding-top: 0 !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: avoid; page-break-before: avoid;
}

/* 13 Quote (COMPACT) */
.article-quote {
  font-size: 13px;
  line-height: 1.2;
  font-style: italic;
}

/* 14 Mod line */
.article-mod-line {
  white-space: nowrap;
  color: grey;
  line-height: 1.05;
  font-size: 10px;
  letter-spacing: 0.3px;
  margin: 5px 0 0 0 !important;
  padding-top: 0 !important;
}
.article-mod-line > span { display: inline; margin: 0; padding: 0; }
.article-mod-line > span + span { margin-left: 4px; }
.article-modification-date { font-size: 11px; letter-spacing: 0.3px; }

/* 15 Vector resets */
.vector-body p { margin: 0 !important; padding: 0 !important; }

/* 16 Links */
a[href]:after { content: none !important; }
.article-external-reference a {
  word-break: break-word;
  overflow-wrap: anywhere;
  text-decoration: none;
  color: #292828 !important;
  font-size: 11px;   /* smaller */
  line-height: 1.15;
  letter-spacing: 0;
}

/* 17 Page control */
#article-content { orphans: 2; widows: 2; }

/* 18 Prevent bad splits */
#article-title,
.article-title-link,
.article-metadata,
.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;
  }
}