MediaWiki:Print.css: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 3: Line 3:
   =========================== */
   =========================== */


/* 1) Font face */
/* Visibility of the print-only block (Common.css hides it on screen) */
.print-only {
  display: block !important;
}
 
/* Font face */
@font-face {
@font-face {
   font-family: 'HALColant-TextRegular';
   font-family: "HALColant-TextRegular";
   src: url('/fonts/HALColant-TextRegular.woff2?v=20250820') format('woff2'),
   src: url("/fonts/HALColant-TextRegular.woff2?v=20250820") format("woff2"),
      url('/fonts/HALColant-TextRegular.woff?v=20250820') format('woff');
    url("/fonts/HALColant-TextRegular.woff?v=20250820") format("woff");
   font-weight: normal;
   font-weight: normal;
   font-style: normal;
   font-style: normal;
Line 13: Line 18:
}
}


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


/* 3) Base visibility & typography */
/* Base typography */
.print-only { display: block !important; }
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: #292828 !important;
   color: #292828 !important;
   background: #fff !important;
   background: #fff !important;
}
}


/* 4) Page & narrow column — A4 portrait; 12mm outer margin; 93mm column */
/* Page & column */
@page { size: A4 portrait; margin: 12mm; }
@page {
  size: A4 portrait;
  margin: 12mm;
}


.entry-wrapper.print-a4-narrow {
.entry-wrapper.print-a4-narrow {
Line 37: Line 47:
}
}


/* 5) Titles & people (compact) */
/* Titles & people */
.article-title {
.article-title {
   font-size: 16px;
   font-size: 16px;
Line 54: Line 64:
   padding-top: 6px;
   padding-top: 6px;
}
}
.article-people a { text-decoration: underline; color: #292828 !important; }
.article-people a {
  text-decoration: underline;
  color: #292828 !important;
}


/* 6) Entry number row */
/* Entry number row */
.article-entry-number { font-size: 12px; line-height: 16px; margin: 0; }
.article-entry-number {
  font-size: 12px;
  line-height: 16px;
  margin: 0;
}


/* 7) Centered link row */
/* Centered link row */
.link-pdf {
.link-pdf {
   text-align: center;
   text-align: center;
Line 67: Line 84:
   padding-top: 0;
   padding-top: 0;
}
}
.link-pdf a, .link-pdf p {
.link-pdf a,
.link-pdf p {
   display: inline-block;
   display: inline-block;
   text-decoration: none;
   text-decoration: none;
Line 75: Line 93:
}
}


/* 8) Type line */
/* Type line */
.article-type {
.article-type {
   font-size: 12px;
   font-size: 12px;
Line 83: Line 101:
   color: #292828 !important;
   color: #292828 !important;
}
}
.article-type a { text-decoration: none; color: #292828 !important; }
.article-type a {
  text-decoration: none;
  color: #292828 !important;
}


/* 9) Metadata grid (compact) */
/* Metadata grid (compact) */
.article-metadata,
.article-metadata,
.article-metadata * { margin: 0 !important; border: none; background: none; }
.article-metadata * {
  margin: 0 !important;
  border: none;
  background: none;
}


.article-metadata {
.article-metadata {
Line 101: Line 126:
   letter-spacing: 0.3px;
   letter-spacing: 0.3px;
}
}
.article-metadata-value { font-size: 11px; text-transform: capitalize; }
.article-metadata-value {
.article-metadata-value a { color: #292828 !important; text-decoration: none; }
  font-size: 11px;
 
  text-transform: capitalize;
/* 10) Images (shorter to favor text) */
}
.article-metadata + .article-images { margin-top: 0 !important; padding-top: 0 !important; }
.article-metadata-value a {
.article-images { margin: 0 !important; padding-top: 0 !important; }
  color: #292828 !important;
  text-decoration: none;
}


/* 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 {
.article-images .image-container {
   display: inline-flex;
   display: inline-flex;
Line 136: Line 172:
   width: 100%;
   width: 100%;
}
}
.caption-image1:empty { display: none; }
.caption-image1:empty {
  display: none;
}


/* 11) Labels & bodies (compact) */
/* Labels & bodies (compact) */
.article-label-description,
.article-label-description,
.article-label-reflection,
.article-label-reflection,
Line 152: Line 190:
   letter-spacing: 0.4px;
   letter-spacing: 0.4px;
}
}
.article-metadata + .article-label-description,
.article-metadata + .article-label-description,
.article-images + .article-label-description,
.article-images + .article-label-description,
Line 158: Line 195:
.article-reflection + .article-label-external-reference,
.article-reflection + .article-label-external-reference,
.article-external-reference + .article-label-quote,
.article-external-reference + .article-label-quote,
.article-quote + .article-label-modification-date { margin-top: 6px !important; }
.article-quote + .article-label-modification-date {
  margin-top: 6px !important;
}


.article-description,
.article-description,
Line 173: Line 212:
}
}


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


/* 13) Mod line */
/* Mod line */
.article-mod-line {
.article-mod-line {
   white-space: nowrap;
   white-space: nowrap;
Line 186: Line 229:
   padding-top: 0 !important;
   padding-top: 0 !important;
}
}
.article-mod-line > span { display: inline; margin: 0; padding: 0; }
.article-mod-line > span {
.article-mod-line > span + span { margin-left: 4px; }
  display: inline;
.article-modification-date { font-size: 11px; letter-spacing: 0.3px; }
  margin: 0;
  padding: 0;
}
.article-mod-line > span + span {
  margin-left: 4px;
}
.article-modification-date {
  font-size: 11px;
  letter-spacing: 0.3px;
}


/* 14) Vector resets */
/* Resets */
.vector-body p { margin: 0 !important; padding: 0 !important; }
.vector-body p {
 
  margin: 0 !important;
/* 15) Links */
  padding: 0 !important;
a[href]:after { content: none !important; }
}
a[href]:after {
  content: none !important;
}
.article-external-reference a {
.article-external-reference a {
   word-break: break-word;
   word-break: break-word;
Line 205: Line 260:
}
}


/* 16) Page control defaults */
/* Basic split control */
#article-content { orphans: 2; widows: 2; }
#article-content {
 
  orphans: 2;
/* 17) Avoid really bad splits for a few blocks */
  widows: 2;
}
#article-title,
#article-title,
.article-title-link,
.article-title-link,
.article-metadata,
.article-metadata,
.article-images { break-inside: avoid; page-break-inside: avoid; }
.article-images {
  break-inside: avoid;
  page-break-inside: avoid;
}


/* 18) Print-only column enforcement + border toggle */
/* Column enforcement & border toggle (print.css is print-only, so no wrappers needed) */
@media print {
.entry-wrapper.print-a4-narrow,
  /* Column width + centering */
.print-only.entry-wrapper,
  .entry-wrapper.print-a4-narrow,
.print-only .entry-wrapper,
  .print-only.entry-wrapper,
.print-only {
  .print-only .entry-wrapper {
  width: 93mm !important;
    width: 93mm !important;
  max-width: 93mm !important;
    max-width: 93mm !important;
  margin-left: auto !important;
    margin-left: auto !important;
  margin-right: auto !important;
    margin-right: auto !important;
  box-sizing: border-box !important;
    box-sizing: border-box !important;
}
  }
.print-only *,
  .print-only {
.entry-wrapper.print-a4-narrow * {
    width: 93mm !important;
  max-width: 100% !important;
    max-width: 93mm !important;
}
    margin-left: auto !important;
.print-only .mw-body,
    margin-right: auto !important;
.print-only .vector-body,
    box-sizing: border-box !important;
.print-only .content,
  }
.print-only .list-container,
  .print-only *, .entry-wrapper.print-a4-narrow * { max-width: 100% !important; }
.print-only table {
  .print-only .mw-body,
  width: auto !important;
  .print-only .vector-body,
  max-width: 100% !important;
  .print-only .content,
}
  .print-only .list-container,
.print-only img {
  .print-only table { width: auto !important; max-width: 100% !important; }
  width: auto !important;
  .print-only img { width: auto !important; max-width: 100% !important; height: auto !important; }
  max-width: 100% !important;
  height: auto !important;
}


  /* Border: default WITH; disable by adding .print-no-border on <html> in the iframe */
/* Default WITH border */
  html:not(.print-no-border) .print-only .entry-wrapper,
html:not(.print-no-border) .print-only .entry-wrapper,
  html:not(.print-no-border) .entry-wrapper.print-a4-narrow,
html:not(.print-no-border) .entry-wrapper.print-a4-narrow,
  html:not(.print-no-border) .entry-wrapper.print-a5 {
html:not(.print-no-border) .entry-wrapper.print-a5 {
    border: 0.5pt solid #292828 !important;
  border: 0.5pt solid #292828 !important;
    box-sizing: border-box !important;
  background-clip: padding-box;
    background-clip: padding-box;
  padding: 3mm;
    padding: 3mm;
}
  }
/* NO border */
  html.print-no-border .print-only .entry-wrapper,
html.print-no-border .print-only .entry-wrapper,
  html.print-no-border .entry-wrapper.print-a4-narrow,
html.print-no-border .entry-wrapper.print-a4-narrow,
  html.print-no-border .entry-wrapper.print-a5 {
html.print-no-border .entry-wrapper.print-a5 {
    border: 0 !important;
  border: 0 !important;
    padding: 0 !important;
  padding: 0 !important;
  }
}
}


/* 19) Section rules: ONE consistent line under rows/bodies (no ::after tricks) */
/* Section rules: ONE consistent line under rows/bodies (no ::after tricks) */
@media print {
.article-entry-number,
  /* Lines under these “rows” */
.link-pdf,
  .article-entry-number,
.article-type,
  .link-pdf,
.article-metadata,
  .article-type,
.article-images,
  .article-metadata,
.article-description,
  .article-images,
.article-reflection,
  .article-description,
.article-external-reference,
  .article-reflection,
.article-quote,
  .article-external-reference,
.article-mod-line {
  .article-quote,
  border-bottom: 0.5pt solid #292828 !important;
  .article-mod-line {
  padding-bottom: 6px !important;
    border-bottom: 0.5pt solid #292828 !important;
}
    padding-bottom: 6px !important;
/* Labels show no line (avoids doubles) */
   }
.article-label-description,
.article-label-reflection,
.article-label-external-reference,
.article-label-quote,
.article-label-modification-date {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
}
/* Don’t draw a line under the last item */
#article-content > :last-child {
   border-bottom: 0 !important;
}


  /* Labels show no line (prevents double lines) */
/* Paragraph fragmentation to avoid big gaps */
  .article-label-description,
.article-description p,
  .article-label-reflection,
.article-reflection p,
  .article-label-external-reference,
.article-external-reference p,
   .article-label-quote,
.article-quote p {
  .article-label-modification-date {
  break-inside: auto !important;
    border-bottom: 0 !important;
  page-break-inside: auto !important;
    padding-bottom: 0 !important;
  orphans: 2 !important;
  }
  widows: 2 !important;
   margin: 0 0 1.2mm !important;
}
.article-description p:last-child,
.article-reflection p:last-child,
.article-external-reference p:last-child,
.article-quote p:last-child {
  margin-bottom: 0 !important;
}


  /* Don’t draw a line under the last item */
/* Entry page: unblock pagination + hide UI */
  #article-content > :last-child { border-bottom: 0 !important; }
html,
body,
#show-article-wrapper-entry,
#show-article,
#article-content,
#content,
.mw-body,
.vector-body,
#mw-content-text {
  display: block !important;
  overflow: visible !important;
  contain: none !important;
  max-height: none !important;
}
}
 
#article-content > * {
/* 20) Paragraph fragmentation (single, consolidated block) */
   break-inside: auto !important;
@media print {
  page-break-inside: auto !important;
   .article-description p,
  .article-reflection p,
  .article-external-reference p,
  .article-quote p {
    break-inside: auto !important;
    page-break-inside: auto !important;
    orphans: 2 !important;
    widows: 2 !important;
    margin: 0 0 1.2mm !important;
  }
  .article-description p:last-child,
  .article-reflection p:last-child,
  .article-external-reference p:last-child,
  .article-quote p:last-child {
    margin-bottom: 0 !important;
  }
}
}
 
#print-chooser,
/* 21) Entry page: unblock pagination + hide UI */
#print-options {
@media print {
  display: none !important;
  html, body,
  #show-article-wrapper-entry,
  #show-article,
  #article-content,
  #content, .mw-body, .vector-body, #mw-content-text {
    display: block !important;
    overflow: visible !important;
    contain: none !important;
    max-height: none !important;
  }
  /* Ensure children can fragment; prevents “big white gap then push to next page” */
  #article-content > * {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }
  /* Hide print UI chrome */
  #print-chooser, #print-options { display: none !important; }
}
}


Line 345: Line 403:
       border-bottom: 0.5pt solid #292828 !important;
       border-bottom: 0.5pt solid #292828 !important;
     }
     }
     #article-content > :last-child { border-bottom: 0 !important; }
     #article-content > :last-child {
      border-bottom: 0 !important;
    }
   }
   }
}
}

Navigation menu