MediaWiki:Print.css: Difference between revisions

From softwear.directory
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
/* CSS placed here will affect the print output */
/* --- Global print baseline --- */


/* hide on-screen layout and site chrome in print (generic Ctrl+P case) */
/* show the print layout block */
#show-article-wrapper-entry,
.print-only { display: block !important; }
#show-event-wrapper,
.mw-header, .mw-footer, .sidebar, .noprint,
.hf-header { display: none !important; }


/* show the print version */
/* A5 page setup */
.print-only { display: block !important; /* ensure it shows in print */
@page { size: A5 portrait; margin: 12mm; }
html, body { margin: 0; }
 
/* Main wrapper for the printable entry */
.entry-wrapper.print-a5 {
  width: 100%;
  box-sizing: border-box;
  /* remove forced page break to avoid a blank trailing page on single prints */
  /* page-break-after: always; */
}


/* A5 page */
/* Avoid splitting key sections across pages */
@page { size: A5 portrait; margin: 12mm; }
#article-title,
body { margin: 0; font-family: Georgia, "Times New Roman", serif; color: #111; }
.article-title-link,
.article-images,
.article-metadata,
.article-description,
.article-reflection,
.article-external-reference,
.article-quote {
  page-break-inside: avoid;
  break-inside: avoid;
}


.entry-wrapper.print-a5 { width: 100%; box-sizing: border-box; page-break-after: always; }
/* Typography & spacing for the print layout */
#article-title, .article-title-link, .article-images, .article-metadata { page-break-inside: avoid; }
body { font-family: Georgia, "Times New Roman", serif; color: #111; }


.article-title { font-size: 18pt; line-height: 1.2; margin: 0 0 6mm; }
.article-title { font-size: 18pt; line-height: 1.2; margin: 0 0 6mm; }
.article-people, .article-entry-number, .article-type { font-size: 9pt; margin: 0 0 2mm; }
.article-people, .article-entry-number, .article-type { font-size: 9pt; margin: 0 0 2mm; }


.article-metadata { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; margin: 6mm 0; }
.article-metadata {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4mm;
  margin: 6mm 0;
}
.article-metadata-label { font-weight: bold; font-size: 8.5pt; margin: 0 0 1mm; }
.article-metadata-label { font-weight: bold; font-size: 8.5pt; margin: 0 0 1mm; }
.article-metadata-value { font-size: 9pt; margin: 0; }
.article-metadata-value { font-size: 9pt; margin: 0; }


.article-images .image-container { text-align: center; margin: 6mm 0; }
.article-images .image-container { text-align: center; margin: 6mm 0; }
.article-images img { max-width: 100%; height: auto; }
.caption-image1 { font-size: 8pt; color: #555; margin-top: 2mm; }
.caption-image1 { font-size: 8pt; color: #555; margin-top: 2mm; }


Line 31: Line 52:
.article-label-external-reference,
.article-label-external-reference,
.article-label-quote,
.article-label-quote,
.article-label-modification-date { font-weight: bold; margin: 4mm 0 1.5mm; font-size: 9pt; }
.article-label-modification-date {
 
  font-weight: bold;
  margin: 4mm 0 1.5mm;
  font-size: 9pt;
}
.article-description,
.article-description,
.article-reflection,
.article-reflection,
.article-external-reference,
.article-external-reference,
.article-quote,
.article-quote,
.article-modification-date { font-size: 10pt; line-height: 1.35; }
.article-modification-date {
 
  font-size: 10pt;
.article-images img { max-width: 100%; height: auto; }
  line-height: 1.35;
}


/* don't append raw URLs after link text in print */
/* Don’t append raw URLs in print */
a[href]:after { content: none !important; }
a[href]:after { content: none !important; }


/* wrap long links so they don't bust the line */
/* 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;
}
/* --- INTENTIONAL single-entry print via [print] button --- */
/* hide the grid & chrome, but DO NOT hide the popup wrapper that holds .print-only */
body.print-entry-only #list,
body.print-entry-only .list-container,
body.print-entry-only .mw-header,
body.print-entry-only .mw-footer,
body.print-entry-only .sidebar,
body.print-entry-only #show-event-wrapper,
body.print-entry-only .hf-header,
body.print-entry-only .noprint {
  display: none !important;
}
/* show only the clean print version we injected into the popup */
body.print-entry-only .print-only {
  display: block !important;
}
/* ensure the printed entry flows as a normal page */
body.print-entry-only .entry-wrapper.print-a5 {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  box-sizing: border-box;
  page-break-after: always;
}
}

Revision as of 07:54, 20 August 2025

/* --- Global print baseline --- */

/* show the print layout block */
.print-only { display: block !important; }

/* A5 page setup */
@page { size: A5 portrait; margin: 12mm; }
html, body { margin: 0; }

/* Main wrapper for the printable entry */
.entry-wrapper.print-a5 {
  width: 100%;
  box-sizing: border-box;
  /* remove forced page break to avoid a blank trailing page on single prints */
  /* page-break-after: always; */
}

/* Avoid splitting key sections across pages */
#article-title,
.article-title-link,
.article-images,
.article-metadata,
.article-description,
.article-reflection,
.article-external-reference,
.article-quote {
  page-break-inside: avoid;
  break-inside: avoid;
}

/* Typography & spacing for the print layout */
body { font-family: Georgia, "Times New Roman", serif; color: #111; }

.article-title { font-size: 18pt; line-height: 1.2; margin: 0 0 6mm; }
.article-people, .article-entry-number, .article-type { font-size: 9pt; margin: 0 0 2mm; }

.article-metadata {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4mm;
  margin: 6mm 0;
}
.article-metadata-label { font-weight: bold; font-size: 8.5pt; margin: 0 0 1mm; }
.article-metadata-value { font-size: 9pt; margin: 0; }

.article-images .image-container { text-align: center; margin: 6mm 0; }
.article-images img { max-width: 100%; height: auto; }
.caption-image1 { font-size: 8pt; color: #555; margin-top: 2mm; }

.article-label-description,
.article-label-reflection,
.article-label-external-reference,
.article-label-quote,
.article-label-modification-date {
  font-weight: bold;
  margin: 4mm 0 1.5mm;
  font-size: 9pt;
}
.article-description,
.article-reflection,
.article-external-reference,
.article-quote,
.article-modification-date {
  font-size: 10pt;
  line-height: 1.35;
}

/* Don’t append raw URLs in print */
a[href]:after { content: none !important; }

/* Wrap long links gracefully */
.article-external-reference a {
  word-break: break-word;
  overflow-wrap: anywhere;
}