Jump to content

MediaWiki:Print.css: Difference between revisions

From greyhawk
mNo edit summary
mNo edit summary
Line 15: Line 15:
         margin: 1.5cm; /* Roughly 0.6 inches on all sides */
         margin: 1.5cm; /* Roughly 0.6 inches on all sides */
         font-family: sans-serif; /* Use a common sans-serif font for readability if 'Century Schoolbook' isn't available */
         font-family: sans-serif; /* Use a common sans-serif font for readability if 'Century Schoolbook' isn't available */
         font-size: 10pt; /* A good default base font size for print, adjust as needed */
         font-size: 9pt !important; /* REDUCED: A good default base font size for print, adjust as needed */
         line-height: 1.4; /* Standard line height for readability */
         line-height: 1.3 !important; /* REDUCED: Slightly tighter line height for compactness */
     }
     }


Line 22: Line 22:
     /* Main page title (h1) */
     /* Main page title (h1) */
     h1#firstHeading, #content h1 {
     h1#firstHeading, #content h1 {
         font-size: 20pt !important; /* Larger for main title */
         font-size: 18pt !important; /* SLIGHTLY REDUCED for more compactness */
         margin-top: 1.5em !important;
         margin-top: 1em !important;
         margin-bottom: 0.8em !important;
         margin-bottom: 0.7em !important;
         line-height: 1.2em !important;
         line-height: 1.2em !important;
         text-align: center; /* Center the main title if desired */
         text-align: center;
     }
     }


     /* Section headings from `== Heading ==` (render as h2) */
     /* Section headings from `== Heading ==` (render as h2) */
     h2 {
     h2 {
         font-size: 16pt !important; /* Smaller than h1, but still prominent */
         font-size: 14pt !important; /* SLIGHTLY REDUCED */
         margin-top: 1.5em !important;
         margin-top: 1.2em !important;
         margin-bottom: 0.7em !important;
         margin-bottom: 0.6em !important;
         line-height: 1.3em !important;
         line-height: 1.2em !important;
         text-align: center; /* Center these main section headings */
         text-align: center;
         page-break-after: avoid; /* Keep heading with content below it */
         page-break-after: avoid;
     }
     }


     /* Subsection headings from `=== Subheading ===` (render as h3) */
     /* Subsection headings from `=== Subheading ===` (render as h3) */
     h3 {
     h3 {
         font-size: 14pt !important; /* Good size for subheadings */
         font-size: 12pt !important; /* SLIGHTLY REDUCED */
         margin-top: 1.2em !important;
         margin-top: 1em !important;
         margin-bottom: 0.6em !important;
         margin-bottom: 0.5em !important;
         line-height: 1.3em !important;
         line-height: 1.2em !important;
         page-break-after: avoid;
         page-break-after: avoid;
     }
     }


     /* Smaller headings (h4, h5, h6) if used, make them just slightly bigger than body text */
     /* Smaller headings (h4, h5, h6) */
     h4, h5, h6 {
     h4, h5, h6 {
         font-size: 12pt !important; /* Only slightly larger than body for sub-sub-headings */
         font-size: 10pt !important; /* Closer to body text size */
         margin-top: 1em !important;
         margin-top: 0.8em !important;
         margin-bottom: 0.5em !important;
         margin-bottom: 0.4em !important;
         line-height: 1.3em !important;
         line-height: 1.2em !important;
         page-break-after: avoid;
         page-break-after: avoid;
     }
     }


     /* Specific styling for the 'The Setting and Scene' block which has its own div */
     /* Specific styling for the 'The Setting and Scene' block h2, if needed */
     .mw-parser-output div[style*="text-align: center;"] h2 {
     .mw-parser-output div[style*="text-align: center;"] h2 {
         font-size: 18pt !important; /* Adjust if you want this specific h2 to be different */
         font-size: 16pt !important; /* Adjust if you want this specific h2 to be different */
        /* You can add more specific rules here if needed for this centered block */
     }
     }


     /* --- Text & Paragraph Styling --- */
     /* --- Body Text & List Item Styling --- */
     p, ul, ol, dl, pre, blockquote, table {
    /* Ensure all common text blocks and list items use the smaller base font size */
         font-size: 10pt !important; /* Ensure body text is standard base size */
     p, ul, ol, dl, pre, blockquote, table, li, td, th {
         line-height: 1.5 !important; /* Improve readability with line spacing */
         font-size: 9pt !important; /* REDUCED: Match body font size */
         margin-top: 0.5em !important;
         line-height: 1.4 !important; /* Keep readability */
         margin-bottom: 0.5em !important;
         margin-top: 0.3em !important; /* REDUCED: Tighter spacing between elements */
         margin-bottom: 0.3em !important; /* REDUCED: Tighter spacing between elements */
     }
     }
      
      
     li { /* Ensure list items also inherit size */
     /* Ensure content inside definition lists also gets proper spacing */
         font-size: 10pt !important;
    dd {
        margin-left: 1.5em !important; /* Standard indent for definition descriptions */
        font-size: 9pt !important; /* Ensure consistency */
    }
    dt {
        font-weight: bold !important;
         font-size: 9pt !important; /* Ensure consistency */
     }
     }


     /* --- Image & Thumbnail Styling (from previous attempt, adjusted for better default) --- */
     /* --- Image & Thumbnail Styling --- */
     img {
     img {
         max-width: 100% !important; /* Prevents images from overflowing page */
         max-width: 95% !important; /* Ensure images don't stretch too wide */
         height: auto !important; /* Maintains aspect ratio */
         height: auto !important;
         display: block; /* Ensures they act as blocks */
         display: block;
         margin: 0.8em auto; /* Center images */
         margin: 0.8em auto !important; /* Center images with some vertical spacing */
     }
     }


     .thumb {
     .thumb {
         float: none !important; /* Remove float by default for simpler print layout */
         float: none !important; /* Remove float for simpler print layout */
         margin: 1em auto !important; /* Center the thumbnail container */
         margin: 0.8em auto !important; /* Center the thumbnail container */
         max-width: 250px !important; /* Adjust this to control thumbnail width, e.g., 200px, 150px */
         max-width: 200px !important; /* FURTHER REDUCED: Adjust this to control thumbnail width */
         border: 1px solid #ccc; /* Add a subtle border */
         border: 1px solid #ccc;
         padding: 4px; /* Add some padding inside the border */
         padding: 3px !important; /* Slightly less padding */
         background-color: #f9f9f9; /* Light background for the thumbnail box */
         background-color: #f9f9f9;
         box-sizing: border-box; /* Include padding and border in element's total width/height */
         box-sizing: border-box;
         page-break-inside: avoid; /* Prevent thumbnails from breaking across pages */
         page-break-inside: avoid;
     }
     }


     .thumbinner {
     .thumbinner {
         padding: 3px !important;
         padding: 2px !important; /* Slightly less inner padding */
         border: none !important;
         border: none !important;
         background-color: transparent !important;
         background-color: transparent !important;
Line 101: Line 107:


     .thumbimage {
     .thumbimage {
         max-width: 100% !important; /* Image within thumbnail must respect container */
         max-width: 100% !important;
         height: auto !important;
         height: auto !important;
         display: block;
         display: block;
         border: none !important; /* Remove individual image border if parent .thumb has one */
         border: none !important;
     }
     }


     .thumbcaption {
     .thumbcaption {
         font-size: 9pt !important; /* Smaller font for caption */
         font-size: 8pt !important; /* REDUCED: Smaller font for caption */
         line-height: 1.3em !important;
         line-height: 1.2em !important;
         padding: 3px 0 !important;
         padding: 2px 0 !important;
         text-align: left !important;
         text-align: left !important;
         overflow: hidden !important;
         overflow: hidden !important;
Line 119: Line 125:
         column-count: 1 !important; /* Force single column for print readability */
         column-count: 1 !important; /* Force single column for print readability */
         column-width: auto !important;
         column-width: auto !important;
         column-rule: none !important; /* Remove column lines */
         column-rule: none !important;
     }
     }
     .div-col li, .div-col dd, .div-col p {
     .div-col li, .div-col dd, .div-col p {
         break-inside: avoid; /* Keep content from splitting across column/page breaks */
         break-inside: avoid;
     }
     }
}
}

Revision as of 18:56, 19 June 2025

/* MediaWiki:Print.css */

@media print {
    /* --- General Print Cleanup --- */
    /* Remove navigation, sidebars, and other elements not needed for print */
    #mw-navigation, #mw-panel, #p-cactions, #p-personal, #p-views,
    #p-navigation, #p-search, #siteSub, #footer, #catlinks,
    .noprint, .editsection, .mw-indicators, .printfooter,
    #privacy, #about, #disclaimer, #toc {
        display: none !important;
    }

    /* Adjust page margins for better print layout */
    body {
        margin: 1.5cm; /* Roughly 0.6 inches on all sides */
        font-family: sans-serif; /* Use a common sans-serif font for readability if 'Century Schoolbook' isn't available */
        font-size: 9pt !important; /* REDUCED: A good default base font size for print, adjust as needed */
        line-height: 1.3 !important; /* REDUCED: Slightly tighter line height for compactness */
    }

    /* --- Header Sizing --- */
    /* Main page title (h1) */
    h1#firstHeading, #content h1 {
        font-size: 18pt !important; /* SLIGHTLY REDUCED for more compactness */
        margin-top: 1em !important;
        margin-bottom: 0.7em !important;
        line-height: 1.2em !important;
        text-align: center;
    }

    /* Section headings from `== Heading ==` (render as h2) */
    h2 {
        font-size: 14pt !important; /* SLIGHTLY REDUCED */
        margin-top: 1.2em !important;
        margin-bottom: 0.6em !important;
        line-height: 1.2em !important;
        text-align: center;
        page-break-after: avoid;
    }

    /* Subsection headings from `=== Subheading ===` (render as h3) */
    h3 {
        font-size: 12pt !important; /* SLIGHTLY REDUCED */
        margin-top: 1em !important;
        margin-bottom: 0.5em !important;
        line-height: 1.2em !important;
        page-break-after: avoid;
    }

    /* Smaller headings (h4, h5, h6) */
    h4, h5, h6 {
        font-size: 10pt !important; /* Closer to body text size */
        margin-top: 0.8em !important;
        margin-bottom: 0.4em !important;
        line-height: 1.2em !important;
        page-break-after: avoid;
    }

    /* Specific styling for the 'The Setting and Scene' block h2, if needed */
    .mw-parser-output div[style*="text-align: center;"] h2 {
        font-size: 16pt !important; /* Adjust if you want this specific h2 to be different */
    }

    /* --- Body Text & List Item Styling --- */
    /* Ensure all common text blocks and list items use the smaller base font size */
    p, ul, ol, dl, pre, blockquote, table, li, td, th {
        font-size: 9pt !important; /* REDUCED: Match body font size */
        line-height: 1.4 !important; /* Keep readability */
        margin-top: 0.3em !important; /* REDUCED: Tighter spacing between elements */
        margin-bottom: 0.3em !important; /* REDUCED: Tighter spacing between elements */
    }
    
    /* Ensure content inside definition lists also gets proper spacing */
    dd {
        margin-left: 1.5em !important; /* Standard indent for definition descriptions */
        font-size: 9pt !important; /* Ensure consistency */
    }
    dt {
        font-weight: bold !important;
        font-size: 9pt !important; /* Ensure consistency */
    }

    /* --- Image & Thumbnail Styling --- */
    img {
        max-width: 95% !important; /* Ensure images don't stretch too wide */
        height: auto !important;
        display: block;
        margin: 0.8em auto !important; /* Center images with some vertical spacing */
    }

    .thumb {
        float: none !important; /* Remove float for simpler print layout */
        margin: 0.8em auto !important; /* Center the thumbnail container */
        max-width: 200px !important; /* FURTHER REDUCED: Adjust this to control thumbnail width */
        border: 1px solid #ccc;
        padding: 3px !important; /* Slightly less padding */
        background-color: #f9f9f9;
        box-sizing: border-box;
        page-break-inside: avoid;
    }

    .thumbinner {
        padding: 2px !important; /* Slightly less inner padding */
        border: none !important;
        background-color: transparent !important;
    }

    .thumbimage {
        max-width: 100% !important;
        height: auto !important;
        display: block;
        border: none !important;
    }

    .thumbcaption {
        font-size: 8pt !important; /* REDUCED: Smaller font for caption */
        line-height: 1.2em !important;
        padding: 2px 0 !important;
        text-align: left !important;
        overflow: hidden !important;
    }

    /* --- Column Layout Adjustments --- */
    .module, .div-col {
        column-count: 1 !important; /* Force single column for print readability */
        column-width: auto !important;
        column-rule: none !important;
    }
    .div-col li, .div-col dd, .div-col p {
        break-inside: avoid;
    }
}