Naar inhoud springen

MediaWiki:Print.css: verschil tussen versies

Uit CostaSano-Wiki
Nieuwe pagina aangemaakt met 'CSS die hier wordt geplaatst heeft alleen invloed op de printuitvoer: ===== Print stylesheet for clean PDF export =====: @media print { Page margins (browser respects @page, not body margin): @page { margin-top: 2cm; margin-bottom: 2cm; margin-left: 1.5cm; margin-right: 1.5cm; Footer with page numbers: @bottom-center { content: "Page " counter(page); font-size: 10pt; } } /* Reset body margi…'
 
Geen bewerkingssamenvatting
 
(Een tussenliggende versie door dezelfde gebruiker niet weergegeven)
Regel 1: Regel 1:
/* CSS die hier wordt geplaatst heeft alleen invloed op de printuitvoer */
/* ===========================
  MediaWiki Print Stylesheet
  Save as: MediaWiki:Print.css
  =========================== */


/* ===== Print stylesheet for clean PDF export ===== */
/* Hide elements that are not needed in print */
@media print {
#mw-navigation,
  /* Page margins (browser respects @page, not body margin) */
#footer,
  @page {
#siteNotice,
    margin-top: 2cm;
#mw-page-base,
    margin-bottom: 2cm;
#mw-head-base,
    margin-left: 1.5cm;
#mw-head,
     margin-right: 1.5cm;
#mw-panel,
#toc, /* Table of contents */
.mw-editsection,
.noprint {
     display: none !important;
}


    /* Footer with page numbers */
/* Ensure main content takes full width */
    @bottom-center {
#content,
      content: "Page " counter(page);
.mw-body {
      font-size: 10pt;
    margin: 0;
     }
    padding: 0;
  }
    width: 100%;
    background: white !important;
     color: black !important;
}


  /* Reset body margin so @page takes effect */
/* Improve typography for print */
  body {
body {
    margin: 0;
     font-family: "Times New Roman", Times, serif;
     font-family: "Liberation Serif", Georgia, serif;
     font-size: 12pt;
     font-size: 12pt;
     line-height: 1.4;
     line-height: 1.5;
     color: #000;
}
  }
 
/* Make headings stand out */
h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
     font-weight: bold;
}


  /* Hide navigation, sidebar, edit links, and footer clutter */
/* Ensure images scale properly */
  #mw-panel, #footer, .mw-editsection, .noprint {
img {
     display: none !important;
    max-width: 100%;
  }
     height: auto;
}


  /* Header logo + club name positioned absolutely */
/* Links: show URL after text */
  .print-header {
a[href]:after {
     position: fixed;
     content: " (" attr(href) ")";
    top: 0.5cm;
     font-size: 90%;
    left: 0;
}
    right: 0;
    text-align: right;
     font-size: 10pt;
  }
  .print-header img {
    float: left;
    height: 30px;
    margin-right: 1em;
  }


  /* Headings styling */
/* Avoid breaking tables across pages */
  h1, h2, h3 {
table {
     color: #003366;
     page-break-inside: avoid;
     border-bottom: 1px solid #ccc;
     border-collapse: collapse;
    padding-bottom: 0.2em;
}
  }


  /* References formatting */
th, td {
  .references {
     border: 1px solid #000;
     font-size: 10pt;
     padding: 4px;
     line-height: 1.2;
}
  }


  /* Optional: force page breaks before major sections */
/* Page break before certain sections */
  h1 {
h2 {
     page-break-before: always;
     page-break-before: always;
  }
}


  /* Table styling for clean PDF output */
/* Optional: watermark for printed pages */
  table {
@page {
    border-collapse: collapse;
     margin: 1in;
    width: 100%;
     margin: 1em 0;
  }
  table, th, td {
    border: 1px solid #666;
    padding: 6px;
  }
  th {
    background-color: #f0f0f0;
    font-weight: bold;
  }
}
}
/* ===== End print stylesheet ===== */

Huidige versie van 10 dec 2025 21:52

/* ===========================
   MediaWiki Print Stylesheet
   Save as: MediaWiki:Print.css
   =========================== */

/* Hide elements that are not needed in print */
#mw-navigation,
#footer,
#siteNotice,
#mw-page-base,
#mw-head-base,
#mw-head,
#mw-panel,
#toc, /* Table of contents */
.mw-editsection,
.noprint {
    display: none !important;
}

/* Ensure main content takes full width */
#content,
.mw-body {
    margin: 0;
    padding: 0;
    width: 100%;
    background: white !important;
    color: black !important;
}

/* Improve typography for print */
body {
    font-family: "Times New Roman", Times, serif;
    font-size: 12pt;
    line-height: 1.5;
}

/* Make headings stand out */
h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    font-weight: bold;
}

/* Ensure images scale properly */
img {
    max-width: 100%;
    height: auto;
}

/* Links: show URL after text */
a[href]:after {
    content: " (" attr(href) ")";
    font-size: 90%;
}

/* Avoid breaking tables across pages */
table {
    page-break-inside: avoid;
    border-collapse: collapse;
}

th, td {
    border: 1px solid #000;
    padding: 4px;
}

/* Page break before certain sections */
h2 {
    page-break-before: always;
}

/* Optional: watermark for printed pages */
@page {
    margin: 1in;
}