MediaWiki:Common.css: Difference between revisions

From Lenn's Fun Stuff

No edit summary
No edit summary
Line 1: Line 1:
/* Version 26.0 - Exact Miraheze Reconstruction
/* Version 27.0 - Hard Reset & Miraheze Precision
   Fixed: Desktop Infobox Floats, Featured Box Alignment, and Global Typography
   Specifically fixing Reece McCartney and Featured World alignment
*/
*/


Line 9: Line 9:
     --kh-yellow: #ffd700;
     --kh-yellow: #ffd700;
     --miraheze-white: #ffffff;
     --miraheze-white: #ffffff;
    --miraheze-border: #dcdcdc;
}
}


/* --- 1. CORE CONTENT WRAPPER --- */
/* --- 1. THE LAYOUT RESET --- */
body {
/* This stops Cosmos from "squishing" your content */
    font-family: 'Crimson Pro', serif !important;
.mw-body, #content {
    background-color: #1a1a1a !important;
}
 
#content, .mw-body {
     background-color: var(--miraheze-white) !important;
     background-color: var(--miraheze-white) !important;
     border: 1px solid var(--miraheze-border) !important;
     border: 1px solid #dcdcdc !important;
     padding: 2em !important; /* Increased padding for desktop breathing room */
     padding: 30px !important;
     margin: 20px auto !important;
     margin: 20px auto !important;
     max-width: 1200px !important;
     max-width: 1200px !important;
     box-sizing: border-box;
     display: block !important; /* Forces a standard block layout over Cosmos flex */
     overflow: hidden; /* Prevents floated infoboxes from breaking the container */
     overflow: visible !important;
}
}


/* Fix for misaligned text in Featured World / Content Boxes */
/* Fixes the "Featured World" and lore box alignment */
.mw-parser-output {
.mw-parser-output {
    display: block !important;
     text-align: left !important;
     text-align: left !important;
}
}


/* Force standard margins on all text elements inside lore boxes */
/* --- 2. THE INFOBOX (EXACT MIRAHEZE SPECS) --- */
.mw-parser-output p,
/* Matches the padding and border-collapse of source  */
.mw-parser-output div {
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
}
 
/* --- 2. HEADINGS --- */
h1, h2, h3, .firstHeading {
    font-family: 'Cinzel', serif !important;
    color: var(--kh-green) !important;
    border-bottom: 2px solid var(--kh-green) !important;
    font-weight: 700 !important;
    clear: both; /* Ensures headers don't get caught on infoboxes */
}
 
/* --- 3. THE INFOBOX (DESKTOP PRECISION) --- */
.portable-infobox {
.portable-infobox {
     background-color: #fff !important;
     background-color: #fff !important;
     border: 1px solid var(--miraheze-border) !important;
     border: 1px solid #a2a9b1 !important;
     width: 300px !important;
     width: 320px !important;
     float: right !important;
     float: right !important;
     margin: 0 0 1.5em 1.5em !important;
     margin: 0 0 1em 1em !important;
     padding: 0 !important;
     border-collapse: collapse !important;
    font-size: 0.95em !important;
     font-family: 'Crimson Pro', serif !important;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05) !important;
}
 
/* Stretch Titles/Headers to 100% width */
.portable-infobox .pi-title,
.portable-infobox .pi-header {
    width: 100% !important;
    box-sizing: border-box !important;
     font-family: 'Cinzel', serif !important;
    text-align: center !important;
}
}


Line 73: Line 44:
     background-color: var(--kh-yellow) !important;
     background-color: var(--kh-yellow) !important;
     color: #2d4234 !important;
     color: #2d4234 !important;
     padding: 12px 5px !important;
    font-family: 'Cinzel', serif !important;
     font-size: 1.2em !important;
    font-weight: 700 !important;
     padding: 12px !important;
    text-align: center !important;
     font-size: 1.3em !important;
    border-bottom: 1px solid #a2a9b1 !important;
}
}


Line 80: Line 55:
     background-color: var(--kh-green) !important;
     background-color: var(--kh-green) !important;
     color: #fff !important;
     color: #fff !important;
     padding: 8px 5px !important;
    font-family: 'Cinzel', serif !important;
     padding: 8px !important;
    text-align: center !important;
    font-weight: bold !important;
}
}


/* Data Grid Styling */
/* Data Table Alignment Fix */
.pi-item.pi-data {
.pi-item.pi-data {
     display: table !important; /* Use table-style for perfect label/value alignment */
     display: flex !important;
     width: 100% !important;
     width: 100% !important;
     border-bottom: 1px solid #eee !important;
     border-bottom: 1px solid #f0f0f0 !important;
    margin: 0 !important;
}
 
.pi-data-label {
    flex: 0 0 40% !important;
    background-color: #f8f9fa !important;
    font-weight: 700 !important;
    padding: 10px !important;
    border-right: 1px solid #f0f0f0 !important;
    color: #202122 !important;
}
 
.pi-data-value {
    flex: 1 !important;
    padding: 10px !important;
    background-color: #fff !important;
}
}


.pi-data-label, .pi-data-value {
/* --- 3. IMAGES & CAPTIONS --- */
     display: table-cell !important;
.portable-infobox .pi-image {
     padding: 8px !important;
     padding: 10px !important;
     vertical-align: top !important;
     text-align: center !important;
     background: #fff !important;
}
}


.pi-data-label {
.portable-infobox .pi-image img {
     width: 40% !important;
     max-width: 100% !important;
     background-color: #f9f9f9 !important;
     height: auto !important;
    font-weight: 700 !important;
    border-right: 1px solid #eee !important;
}
}


/* --- 4. MOBILE OVERRIDE --- */
/* --- 4. MOBILE PRECISION --- */
@media screen and (max-width: 768px) {
@media screen and (max-width: 768px) {
     #content, .mw-body {
     #content, .mw-body {
         padding: 15px !important;
         padding: 15px !important;
         margin: 0 !important;
         margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
     }
     }


Line 115: Line 106:
         float: none !important;
         float: none !important;
         width: 100% !important;
         width: 100% !important;
         margin: 10px 0 !important;
         margin: 1em 0 !important;
     }
     }
   
 
     .pi-item.pi-data {
     .pi-item.pi-data {
         display: block !important;
         flex-direction: column !important;
     }
     }
   
 
     .pi-data-label, .pi-data-value {
     .pi-data-label {
        display: block !important;
         width: 100% !important;
         width: 100% !important;
         border-right: none !important;
         border-right: none !important;
        background-color: #eee !important;
     }
     }
}
}

Revision as of 03:55, 18 March 2026

/* Version 27.0 - Hard Reset & Miraheze Precision
   Specifically fixing Reece McCartney and Featured World alignment
*/

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Crimson+Pro:wght@400;700&display=swap');

:root {
    --kh-green: #3e5a47;
    --kh-yellow: #ffd700;
    --miraheze-white: #ffffff;
}

/* --- 1. THE LAYOUT RESET --- */
/* This stops Cosmos from "squishing" your content */
.mw-body, #content {
    background-color: var(--miraheze-white) !important;
    border: 1px solid #dcdcdc !important;
    padding: 30px !important;
    margin: 20px auto !important;
    max-width: 1200px !important;
    display: block !important; /* Forces a standard block layout over Cosmos flex */
    overflow: visible !important;
}

/* Fixes the "Featured World" and lore box alignment */
.mw-parser-output {
    display: block !important;
    text-align: left !important;
}

/* --- 2. THE INFOBOX (EXACT MIRAHEZE SPECS) --- */
/* Matches the padding and border-collapse of source  */
.portable-infobox {
    background-color: #fff !important;
    border: 1px solid #a2a9b1 !important;
    width: 320px !important;
    float: right !important;
    margin: 0 0 1em 1em !important;
    border-collapse: collapse !important;
    font-family: 'Crimson Pro', serif !important;
}

.portable-infobox .pi-title {
    background-color: var(--kh-yellow) !important;
    color: #2d4234 !important;
    font-family: 'Cinzel', serif !important;
    font-weight: 700 !important;
    padding: 12px !important;
    text-align: center !important;
    font-size: 1.3em !important;
    border-bottom: 1px solid #a2a9b1 !important;
}

.portable-infobox .pi-header {
    background-color: var(--kh-green) !important;
    color: #fff !important;
    font-family: 'Cinzel', serif !important;
    padding: 8px !important;
    text-align: center !important;
    font-weight: bold !important;
}

/* Data Table Alignment Fix */
.pi-item.pi-data {
    display: flex !important;
    width: 100% !important;
    border-bottom: 1px solid #f0f0f0 !important;
    margin: 0 !important;
}

.pi-data-label {
    flex: 0 0 40% !important;
    background-color: #f8f9fa !important;
    font-weight: 700 !important;
    padding: 10px !important;
    border-right: 1px solid #f0f0f0 !important;
    color: #202122 !important;
}

.pi-data-value {
    flex: 1 !important;
    padding: 10px !important;
    background-color: #fff !important;
}

/* --- 3. IMAGES & CAPTIONS --- */
.portable-infobox .pi-image {
    padding: 10px !important;
    text-align: center !important;
    background: #fff !important;
}

.portable-infobox .pi-image img {
    max-width: 100% !important;
    height: auto !important;
}

/* --- 4. MOBILE PRECISION --- */
@media screen and (max-width: 768px) {
    #content, .mw-body {
        padding: 15px !important;
        margin: 0 !important;
    }

    .portable-infobox {
        float: none !important;
        width: 100% !important;
        margin: 1em 0 !important;
    }

    .pi-item.pi-data {
        flex-direction: column !important;
    }

    .pi-data-label {
        width: 100% !important;
        border-right: none !important;
        background-color: #eee !important;
    }
}