MediaWiki:Print.css: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Tag: Manual revert
No edit summary
Line 1: Line 1:
/* ===========================
/* ===========================
   Softwear — Print stylesheet
   Softwear — Print stylesheet (stable Chrome PDF)
   A5 portrait, minimal margins
   A5 portrait, minimal margins
   =========================== */
   =========================== */


/* --- 1) Font face (print-safe) --- */
/* 1) Font face */
@font-face {
@font-face {
   font-family: 'HALColant-TextRegular';
   font-family: 'HALColant-TextRegular';
Line 14: Line 14:
}
}


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


/* --- 3) Base print visibility & typography --- */
/* 3) Base visibility & typography */
.print-only { display: block !important; } /* ensure print layout is visible */
.print-only { display: block !important; }


html, body {
html, body {
Line 24: Line 24:
   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;
}
}


/* Use your preferred ink color */
/* 4) Page + container */
body { color: #292828 !important; }
@page { size: A5 portrait; margin: 2.5mm; }


/* --- 4) Page size and margins --- */
@page {
  size: A5 portrait;
  margin: 2.5mm;            /* outer paper margin */
}
/* Inner breathing room for the print block */
.entry-wrapper.print-a5 {
.entry-wrapper.print-a5 {
   width: 100%;
   width: 100%;
   box-sizing: border-box;
   box-sizing: border-box;
   padding: 2.5mm;           /* inner content padding */
   padding: 2.5mm;
}
}


/* --- 5) Titles & people --- */
/* 5) Titles & people */
.article-title {
.article-title {
   font-size: 22px;
   font-size: 22px;
Line 49: Line 42:
   letter-spacing: 0.8px;
   letter-spacing: 0.8px;
   text-align: center;
   text-align: center;
  color: #292828 !important;
   margin: 0;
   margin: 0;
}
}
Line 59: Line 51:
   text-align: center;
   text-align: center;
   text-decoration: underline;
   text-decoration: underline;
  color: #292828 !important;
   margin: 0;
   margin: 0;
   padding-top: 15px;
   padding-top: 15px;
}
}
.article-people a { text-decoration: underline; color: #292828 !important; }


.article-people a {
/* 6) Unified bottom-rule helper (robust in Chrome PDF)
   text-decoration: underline;
  Apply to the specific blocks below via grouped selectors.
   color: #292828 !important;
  We give each block a tiny bottom padding so the rule has room. */
.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: 7px; /* uniform space for the rule */
}
 
.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;                /* device pixel row */
  background: #000;            /* rule color */
  transform: scaleY(0.5);      /* hairline look without relying on backgrounds */
  transform-origin: 50% 100%;
}
}


/* --- 6) Hairline rule under entry number --- */
/* 7) Entry number row */
.article-entry-number {
.article-entry-number {
   font-size: 16px;
   font-size: 16px;
Line 75: Line 98:
   letter-spacing: 0;
   letter-spacing: 0;
   margin: 0;
   margin: 0;
  padding-bottom: 4px;
  border-bottom: none;
  /* draw a crisp hairline using a background gradient */
  background-image: linear-gradient(#000, #000);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0.5px;  /* ~hairline */
}
}


/* --- 7) Link row ([PDF⤴] [WEB⤴]) centered with hairline --- */
/* 8) Centered link row ([PDF⤴] [WEB⤴]) */
.link-pdf {
.link-pdf {
   text-align: center;
   text-align: center;
Line 90: Line 106:
   text-decoration: none;
   text-decoration: none;
   margin: 4px 0 0 0;
   margin: 4px 0 0 0;
   padding: 0 0 0 0;
   padding-top: 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 {
   display: inline-block;
   display: inline-block;
   text-decoration: none;
   text-decoration: none;
Line 107: Line 116:
}
}


/* --- 8) Type line with hairline --- */
/* 9) Type line */
.article-type {
.article-type {
   font-size: 16px;
   font-size: 16px;
Line 113: Line 122:
   letter-spacing: 0;
   letter-spacing: 0;
   margin: 0;
   margin: 0;
   padding: 7px 0;
   padding-top: 7px;
  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;
  display: inline-block;
   color: #292828 !important;
   color: #292828 !important;
}
}
.article-type a { text-decoration: none; color: #292828 !important; }


/* --- 9) Metadata grid (no margins/paddings; hairline under block) --- */
/* 10) Metadata grid (no stray spacing) */
.article-metadata,
.article-metadata,
.article-metadata * {
.article-metadata * {
Line 134: Line 134:
   background: 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: 2mm;
   padding: 11px 0 7px 0;
   padding-top: 11px;
   line-height: 1 !important;
   line-height: 1 !important;
  border-bottom: none;
  background-image: linear-gradient(#000, #000);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0.5px;
}
}
.article-metadata-label {
.article-metadata-label {
   font-size: 13px;
   font-size: 13px;
Line 154: Line 146:
   letter-spacing: 0.3px;
   letter-spacing: 0.3px;
}
}
.article-metadata-value {
.article-metadata-value {
   font-size: 15px;
   font-size: 15px;
Line 164: Line 155:
}
}


/* Remove any accidental gap before images */
/* 11) Image block (no gaps) */
.article-metadata + .article-images {
.article-metadata + .article-images { margin-top: 0 !important; padding-top: 0 !important; }
  margin-top: 0 !important;
  padding-top: 0 !important;
}


/* --- 10) Images & caption (no gaps; hairline under block) --- */
.article-images {
.article-images {
   margin: 0 !important;
   margin: 0 !important;
   padding: 0 !important;
   padding-top: 0 !important;
 
  border-bottom: none;
  background-image: linear-gradient(#000, #000);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0.5px;
}
}
.article-images .image-container {
.article-images .image-container {
   display: inline-flex;
   display: inline-flex;
   flex-direction: column; /* stack image then caption */
   flex-direction: column;   /* image then caption */
   align-items: flex-start; /* left-align image & caption */
   align-items: flex-start; /* left align */
   margin: 0 !important;
   margin: 0 !important;
   padding: 0 !important;
   padding: 0 !important;
}
}
.article-images .image-container img,
.article-images .image-container img,
.image-container img {
.image-container img {
   display: block;
   display: block;
   max-height: 85mm;       /* cap instead of forcing height to reduce jumps */
   max-height: 85mm;
   height: auto;
   height: auto;
   width: auto;
   width: auto;
Line 202: Line 181:
   line-height: 0;
   line-height: 0;
}
}
.caption-image1 {
.caption-image1 {
   margin: 0 !important;
   margin: 0 !important;
   padding: 0 0 11px 0 !important; /* small breathing room under caption */
   padding: 0 !important;
   line-height: 1 !important;
   line-height: 1 !important;
   font-size: 9pt;
   font-size: 9pt;
Line 212: Line 190:
   width: 100%;
   width: 100%;
}
}
.caption-image1:empty { display: none; }


/* Kill user-agent margins in Vector paragraphs that sneak in */
/* 12) Labels & bodies (gap logic that doesn’t create blanks when sections are missing) */
.vector-body p { margin: 0 !important; padding: 0 !important; }
 
/* --- 11) Section labels & bodies --- */
.article-label-description,
.article-label-description,
.article-label-reflection,
.article-label-reflection,
Line 223: Line 199:
.article-label-modification-date {
.article-label-modification-date {
   text-transform: uppercase;
   text-transform: uppercase;
   margin: 11px 0 0 0 !important;
   margin: 10px 0 0 0 !important; /* small, consistent top margin */
   padding: 0 !important;
   padding: 0 !important;
   text-indent: 35px;
   text-indent: 35px;
Line 229: Line 205:
   font-size: 14px;
   font-size: 14px;
   letter-spacing: 0.5px;
   letter-spacing: 0.5px;
  break-after: avoid; page-break-after: avoid; /* no orphan label */
}


  /* prevent a break RIGHT AFTER the label (no orphan label) */
/* If a label directly follows a “ruled” block, keep it tight */
  break-after: avoid;
.article-entry-number + .article-title-link .link-pdf + .article-type + .article-metadata + .article-label-description { margin-top: 8px !important; } /* very specific path, safe to ignore if it doesn't match */
   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: 10px !important;
}
}


/* Bodies */
.article-description,
.article-description,
.article-reflection,
.article-reflection,
Line 245: Line 230:
   letter-spacing: 0.8px;
   letter-spacing: 0.8px;
   margin-top: 0 !important;
   margin-top: 0 !important;
   padding: 0 0 11px 0 !important;
   padding-top: 0 !important;
 
  /* let long content flow normally; avoid hard blocking */
  page-break-inside: auto;
  break-inside: auto;
 
  /* draw hairline below each section body */
  border-bottom: none;
  background-image: linear-gradient(#000, #000);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0.5px;
}
}


/* Don’t allow a break BEFORE the first block following each label */
/* Keep label+body together */
.article-label-description + .article-description,
.article-label-description + .article-description,
.article-label-reflection + .article-reflection,
.article-label-reflection + .article-reflection,
Line 265: Line 239:
.article-label-quote + .article-quote,
.article-label-quote + .article-quote,
.article-label-modification-date + .article-modification-date {
.article-label-modification-date + .article-modification-date {
   break-before: avoid;
   break-before: avoid; page-break-before: avoid;
  page-break-before: avoid;
}
 
/* Gentle control on widows/orphans globally */
#article-content { orphans: 2; widows: 2; }
 
/* --- 12) Link handling for print --- */
a[href]:after { content: none !important; }  /* no raw URL echo */
.article-external-reference a {
  word-break: break-word;
  overflow-wrap: anywhere;
  text-decoration: none;
  color: #292828 !important;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0;
}
}


/* 13) Quote look */
.article-quote {
.article-quote {
   font-size: 26px;
   font-size: 26px;
Line 289: Line 248:
   letter-spacing: 1.2px;
   letter-spacing: 1.2px;
   font-style: italic;
   font-style: italic;
  margin-bottom: 7px!important;
  padding-bottom: 7px!important;
}
}


.article-mod-line{
/* 14) “Added on … To the softwear.directory” line (single line, with rule) */
  margin-top:7px!important;
.article-mod-line {
  padding-top: 7px!important;
   white-space: nowrap;
   white-space:nowrap;
   color: grey;
   color:grey;
   line-height: 1;
   line-height:1;
   font-size: 14px;
   font-size:14px;
   letter-spacing: 0.5px;
   letter-spacing:0.5px;
   margin: 7px 0 0 0 !important;
   margin:0; padding:0;
   padding-top: 7px !important;
   text-indent:35px;
}
}
.article-mod-line > span{
.article-mod-line > span { display: inline; margin: 0; padding: 0; }
  display:inline;
.article-mod-line > span + span { margin-left: 6px; }
  margin:0; padding:0;
.article-modification-date { font-size: 15px; letter-spacing: 0.5px; }
}
.article-mod-line > span + span{ margin-left:6px; }


.article-modification-date {
/* 15) Paragraph defaults from Vector that may sneak in */
  font-size:15px;
.vector-body p { margin: 0 !important; padding: 0 !important; }
  letter-spacing:0.5px;
  margin:0; padding:0;
}


/* wrappers: no internal spacing, only add gap if a wrapper actually exists */
/* 16) Link printing */
.print-sec { margin: 0; padding: 0; }
a[href]:after { content: none !important; }
.print-sec + .print-sec { margin-top: 6mm; } /* tune spacing */
.article-external-reference a {
 
  word-break: break-word;
/* make sure the label/content inside a wrapper don’t add surprise margins */
  overflow-wrap: anywhere;
.print-sec > * { margin: 0; padding: 0; }
   text-decoration: none;
 
   color: #292828 !important;
/* optional: draw your “hairline” only on wrappers that exist */
   font-size: 17px;
.print-sec {
   line-height: 1;
   border-bottom: none;
   letter-spacing: 0;
   background-image: linear-gradient(#000, #000);
   background-repeat: no-repeat;
   background-position: 0 100%;
   background-size: 100% 0.5px;
  padding-bottom: 7px; /* room for the hairline; adjust if you like */
}
}


/* avoid extra gap above the first .print-sec after metadata/images */
/* 17) Keep things tidy across pages */
.article-metadata + .print-sec,
#article-content { orphans: 2; widows: 2; }
.article-images + .print-sec { margin-top: 4mm; }


/* hide empty caption if no text sneaks in */
/* 18) Prevent bad splits on key blocks only */
.caption-image1:empty { display: none; }
#article-title,
.article-title-link,
.article-metadata,
.article-images { break-inside: avoid; page-break-inside: avoid; }

Navigation menu