MediaWiki:Common.css: Difference between revisions

From Lenn's Fun Stuff

No edit summary
No edit summary
Line 1: Line 1:
/* Version 28.0 - Miraheze Exact Clone
/* Version 29.0 - Compact Miraheze Reconstruction
   Fixes: TOC Styling, Infobox Borders, and Reece McCartney Alignment
   Fixes: Smaller Infobox width, reduced padding, and TOC alignment
*/
*/


Line 17: Line 17:
#content, .mw-body {
#content, .mw-body {
     background-color: #ffffff !important;
     background-color: #ffffff !important;
     border: 1px solid #a2a9b1 !important; /* Specific Miraheze Gray */
     border: 1px solid #a2a9b1 !important;
     padding: 1.5em 2.5em !important;
     padding: 1.5em 2em !important;
     margin: 1em auto !important;
     margin: 1em auto !important;
     max-width: 1100px !important; /* Restricts width to match Miraheze layout */
     max-width: 1100px !important;
     line-height: 1.6 !important;
     line-height: 1.5 !important;
     display: block !important;
     display: block !important;
}
}


/* --- 2. TABLE OF CONTENTS (TOC) --- */
/* --- 2. TABLE OF CONTENTS (TOC) --- */
/* Miraheze TOCs have a specific background and border */
#toc, .toc {
#toc, .toc {
     background-color: #f8f9fa !important;
     background-color: #f8f9fa !important;
     border: 1px solid #a2a9b1 !important;
     border: 1px solid #a2a9b1 !important;
     padding: 10px !important;
     padding: 8px !important;
     font-size: 95% !important;
     font-size: 90% !important; /* Smaller text for compact look */
     display: table !important; /* Ensures it only takes up needed space */
     display: table !important;
     margin-bottom: 1em !important;
     margin-bottom: 1em !important;
}
}


.toctitle h2 {
.toctitle h2 {
     font-family: sans-serif !important; /* Miraheze TOC titles use sans-serif */
     font-family: sans-serif !important;
     font-size: 100% !important;
     font-size: 100% !important;
     font-weight: bold !important;
     font-weight: bold !important;
     border-bottom: none !important;
     border-bottom: none !important;
     text-align: center !important;
     text-align: center !important;
    color: #000 !important;
}
}


/* --- 3. THE INFOBOX (MIRAHEZE RECONSTRUCTION) --- */
/* --- 3. THE INFOBOX (COMPACT VERSION) --- */
.portable-infobox {
.portable-infobox {
     background-color: #fff !important;
     background-color: #fff !important;
     border: 1px solid #a2a9b1 !important;
     border: 1px solid #a2a9b1 !important;
     width: 320px !important;
     width: 270px !important; /* Shrunk from 320px */
     float: right !important;
     float: right !important;
     margin: 0 0 1em 1em !important;
     margin: 0 0 1em 1.2em !important;
     padding: 0 !important;
     padding: 0 !important;
     border-spacing: 0 !important;
     border-spacing: 0 !important;
    font-size: 0.88em !important; /* Smaller font for a "smaller" feel */
}
}


Line 61: Line 60:
     font-family: 'Cinzel', serif !important;
     font-family: 'Cinzel', serif !important;
     font-weight: bold !important;
     font-weight: bold !important;
     padding: 10px !important;
     padding: 8px !important; /* Reduced padding */
     font-size: 1.25em !important;
     font-size: 1.15em !important;
     border-bottom: 1px solid #a2a9b1 !important;
     border-bottom: 1px solid #a2a9b1 !important;
     text-align: center !important;
     text-align: center !important;
Line 71: Line 70:
     color: #fff !important;
     color: #fff !important;
     font-family: 'Cinzel', serif !important;
     font-family: 'Cinzel', serif !important;
     padding: 6px !important;
     padding: 5px !important; /* Reduced padding */
     text-align: center !important;
     text-align: center !important;
     font-weight: bold !important;
     font-weight: bold !important;
Line 78: Line 77:
/* Data Row Precision */
/* Data Row Precision */
.pi-item.pi-data {
.pi-item.pi-data {
     display: table-row !important; /* Forces traditional alignment */
     display: table-row !important;
     width: 100% !important;
     width: 100% !important;
}
}
Line 84: Line 83:
.pi-data-label {
.pi-data-label {
     display: table-cell !important;
     display: table-cell !important;
     width: 35% !important;
     width: 40% !important; /* Adjusted ratio for smaller width */
     background-color: #f2f2f2 !important;
     background-color: #f2f2f2 !important;
     font-weight: bold !important;
     font-weight: bold !important;
     padding: 7px 10px !important;
     padding: 5px 8px !important; /* Tighter padding */
     border-bottom: 1px solid #a2a9b1 !important;
     border-bottom: 1px solid #a2a9b1 !important;
     border-right: 1px solid #a2a9b1 !important;
     border-right: 1px solid #a2a9b1 !important;
Line 95: Line 94:
.pi-data-value {
.pi-data-value {
     display: table-cell !important;
     display: table-cell !important;
     padding: 7px 10px !important;
     padding: 5px 8px !important; /* Tighter padding */
     border-bottom: 1px solid #a2a9b1 !important;
     border-bottom: 1px solid #a2a9b1 !important;
     vertical-align: top !important;
     vertical-align: top !important;
     background-color: #ffffff !important;
     background-color: #ffffff !important;
}
/* Remove bottom border from last item */
.pi-item.pi-data:last-child .pi-data-label,
.pi-item.pi-data:last-child .pi-data-value {
    border-bottom: none !important;
}
}



Revision as of 04:03, 18 March 2026

/* Version 29.0 - Compact Miraheze Reconstruction
   Fixes: Smaller Infobox width, reduced padding, and TOC 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;
}

/* --- 1. THE MAIN PAGE CONTAINER --- */
body {
    font-family: 'Crimson Pro', serif !important;
}

#content, .mw-body {
    background-color: #ffffff !important;
    border: 1px solid #a2a9b1 !important;
    padding: 1.5em 2em !important;
    margin: 1em auto !important;
    max-width: 1100px !important;
    line-height: 1.5 !important;
    display: block !important;
}

/* --- 2. TABLE OF CONTENTS (TOC) --- */
#toc, .toc {
    background-color: #f8f9fa !important;
    border: 1px solid #a2a9b1 !important;
    padding: 8px !important;
    font-size: 90% !important; /* Smaller text for compact look */
    display: table !important;
    margin-bottom: 1em !important;
}

.toctitle h2 {
    font-family: sans-serif !important;
    font-size: 100% !important;
    font-weight: bold !important;
    border-bottom: none !important;
    text-align: center !important;
}

/* --- 3. THE INFOBOX (COMPACT VERSION) --- */
.portable-infobox {
    background-color: #fff !important;
    border: 1px solid #a2a9b1 !important;
    width: 270px !important; /* Shrunk from 320px */
    float: right !important;
    margin: 0 0 1em 1.2em !important;
    padding: 0 !important;
    border-spacing: 0 !important;
    font-size: 0.88em !important; /* Smaller font for a "smaller" feel */
}

.portable-infobox .pi-title {
    background-color: var(--kh-yellow) !important;
    color: #000 !important;
    font-family: 'Cinzel', serif !important;
    font-weight: bold !important;
    padding: 8px !important; /* Reduced padding */
    font-size: 1.15em !important;
    border-bottom: 1px solid #a2a9b1 !important;
    text-align: center !important;
}

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

/* Data Row Precision */
.pi-item.pi-data {
    display: table-row !important;
    width: 100% !important;
}

.pi-data-label {
    display: table-cell !important;
    width: 40% !important; /* Adjusted ratio for smaller width */
    background-color: #f2f2f2 !important;
    font-weight: bold !important;
    padding: 5px 8px !important; /* Tighter padding */
    border-bottom: 1px solid #a2a9b1 !important;
    border-right: 1px solid #a2a9b1 !important;
    vertical-align: top !important;
}

.pi-data-value {
    display: table-cell !important;
    padding: 5px 8px !important; /* Tighter padding */
    border-bottom: 1px solid #a2a9b1 !important;
    vertical-align: top !important;
    background-color: #ffffff !important;
}

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

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