MediaWiki:Print.css: Difference between revisions

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


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


Line 44: Line 44:
   margin: 0;
   margin: 0;
}
}
.article-people {
.article-people {
   font-size: 22px;
   font-size: 22px;
Line 56: Line 55:
.article-people a { text-decoration: underline; color: #292828 !important; }
.article-people a { text-decoration: underline; color: #292828 !important; }


/* 6) Unified bottom-rule helper (robust in Chrome PDF)
/* 6) Unified bottom-rule (cross-browser safe) */
  Apply to the specific blocks below via grouped selectors.
  We give each block a tiny bottom padding so the rule has room. */
.article-entry-number,
.article-entry-number,
.link-pdf,
.link-pdf,
Line 69: Line 66:
.article-quote,
.article-quote,
.article-mod-line {
.article-mod-line {
  position: relative;
   padding-bottom: 7px;  
   padding-bottom: 7px; /* uniform space for the rule */
  border-bottom: 0.5pt solid #000; /* works in both Chrome & Firefox */
}
 
.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%;
}
}


Line 127: Line 105:
.article-type a { text-decoration: none; color: #292828 !important; }
.article-type a { text-decoration: none; color: #292828 !important; }


/* 10) Metadata grid (no stray spacing) */
/* 10) Metadata grid */
.article-metadata,
.article-metadata,
.article-metadata * {
.article-metadata * {
Line 155: Line 133:
}
}


/* 11) Image block (no gaps) */
/* 11) Images */
.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;
   margin: 0 !important;
Line 164: Line 141:
.article-images .image-container {
.article-images .image-container {
   display: inline-flex;
   display: inline-flex;
   flex-direction: column;   /* image then caption */
   flex-direction: column;
   align-items: flex-start; /* left align */
   align-items: flex-start;
   margin: 0 !important;
   margin: 0 !important;
   padding: 0 !important;
   padding: 0 !important;
Line 192: Line 169:
.caption-image1:empty { display: none; }
.caption-image1:empty { display: none; }


/* 12) Labels & bodies (gap logic that doesn’t create blanks when sections are missing) */
/* 12) Labels & bodies */
.article-label-description,
.article-label-description,
.article-label-reflection,
.article-label-reflection,
Line 199: Line 176:
.article-label-modification-date {
.article-label-modification-date {
   text-transform: uppercase;
   text-transform: uppercase;
   margin: 10px 0 0 0 !important; /* small, consistent top margin */
   margin: 10px 0 0 0 !important;
   padding: 0 !important;
   padding: 0 !important;
   text-indent: 35px;
   text-indent: 35px;
Line 205: Line 182:
   font-size: 14px;
   font-size: 14px;
   letter-spacing: 0.5px;
   letter-spacing: 0.5px;
   break-after: avoid; page-break-after: avoid; /* no orphan label */
   break-after: avoid; page-break-after: avoid;
}
}
/* If a label directly follows a “ruled” block, keep it tight */
.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 */
.article-metadata + .article-label-description,
.article-metadata + .article-label-description,
.article-images + .article-label-description,
.article-images + .article-label-description,
Line 218: Line 192:
   margin-top: 10px !important;
   margin-top: 10px !important;
}
}
/* Bodies */
.article-description,
.article-description,
.article-reflection,
.article-reflection,
Line 232: Line 204:
   padding-top: 0 !important;
   padding-top: 0 !important;
}
}
/* 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 242: Line 212:
}
}


/* 13) Quote look */
/* 13) Quote */
.article-quote {
.article-quote {
   font-size: 26px;
   font-size: 26px;
Line 250: Line 220:
}
}


/* 14) “Added on … To the softwear.directory” line (single line, with rule) */
/* 14) Mod line */
.article-mod-line {
.article-mod-line {
   white-space: nowrap;
   white-space: nowrap;
Line 264: Line 234:
.article-modification-date { font-size: 15px; letter-spacing: 0.5px; }
.article-modification-date { font-size: 15px; letter-spacing: 0.5px; }


/* 15) Paragraph defaults from Vector that may sneak in */
/* 15) Vector resets */
.vector-body p { margin: 0 !important; padding: 0 !important; }
.vector-body p { margin: 0 !important; padding: 0 !important; }


/* 16) Link printing */
/* 16) Links */
a[href]:after { content: none !important; }
a[href]:after { content: none !important; }
.article-external-reference a {
.article-external-reference a {
Line 279: Line 249:
}
}


/* 17) Keep things tidy across pages */
/* 17) Page control */
#article-content { orphans: 2; widows: 2; }
#article-content { orphans: 2; widows: 2; }


/* 18) Prevent bad splits on key blocks only */
/* 18) Prevent bad splits */
#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; }

Navigation menu