MediaWiki:Print.css: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Created page with "→‎CSS placed here will affect the print output: →‎A5 page setup: @page { size: A5 portrait; margin: 12mm; } @media print { →‎hide site chrome: .mw-header, .mw-footer, .mw-portlet, .sidebar, .noprint { display: none !important; } body { margin: 0; font-family: Georgia, "Times New Roman", serif; color: #111; } .entry-wrapper.print-a5 { width: 100%; box-sizing: border-box; page-break-after: always; } →‎keep key blocks together: ...")
 
No edit summary
Line 1: Line 1:
/* CSS placed here will affect the print output */
/* CSS placed here will affect the print output */


/* A5 page setup */
/* hide print block on screen */
@page {
.print-only { display: none; }
  size: A5 portrait;
  margin: 12mm;
}


@media print {
@media print {
   /* hide site chrome */
   /* hide on-screen layout and site chrome */
   .mw-header, .mw-footer, .mw-portlet, .sidebar, .noprint { display: none !important; }
  #show-article-wrapper-entry,
  #show-event-wrapper,
   .mw-header, .mw-footer, .sidebar, .noprint { display: none !important; }


  /* show the print version */
  .print-only { display: block; }
  /* A5 page */
  @page { size: A5 portrait; margin: 12mm; }
   body { margin: 0; font-family: Georgia, "Times New Roman", serif; color: #111; }
   body { margin: 0; font-family: Georgia, "Times New Roman", serif; color: #111; }


   .entry-wrapper.print-a5 {
   .entry-wrapper.print-a5 { width: 100%; box-sizing: border-box; page-break-after: always; }
    width: 100%;
    box-sizing: border-box;
    page-break-after: always;
  }
 
  /* keep key blocks together */
   #article-title, .article-title-link, .article-images, .article-metadata { page-break-inside: avoid; }
   #article-title, .article-title-link, .article-images, .article-metadata { page-break-inside: avoid; }


Line 44: Line 42:
   .article-modification-date { font-size: 10pt; line-height: 1.35; }
   .article-modification-date { font-size: 10pt; line-height: 1.35; }


  /* scale first image nicely for A5 */
   .article-images img { max-width: 100%; height: auto; }
   .article-images img { max-width: 100%; height: auto; }
}
}

Navigation menu