MediaWiki:Common.css: Difference between revisions

From Lenn's Fun Stuff

No edit summary
Tags: Mobile edit Mobile web edit
No edit summary
Line 1: Line 1:
/* Version 8.0 - FINAL FANDOM OVERHAUL (Stable Build) */
/* Version 9.0 - Miraheze Reconstruction (Stable Build) */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Crimson+Pro:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Crimson+Pro:wght@400;700&display=swap');


Line 6: Line 6:
     --kh-yellow: #ffd700 !important;
     --kh-yellow: #ffd700 !important;
     --kh-dark-text: #2d4234 !important;
     --kh-dark-text: #2d4234 !important;
     --kh-light-bg: #e9efe9 !important; /* Darker background to make white cards "pop" */
     --kh-light-bg: #f9fdfa !important;
    --kh-label-bg: #f2f2f2 !important;
    --kh-data-bg: #ffffff !important;
     --kh-border: 2px solid #3e5a47 !important;
     --kh-border: 2px solid #3e5a47 !important;
}
}


/* 1. SITE-WIDE BACKGROUND */
/* 1. GLOBAL LAYOUT & BACKGROUND */
body, html, #cosmos-content-wrapper {  
body, html, #cosmos-content-wrapper {  
     background-color: var(--kh-light-bg) !important;  
     background-color: var(--kh-light-bg) !important;  
Line 16: Line 18:
}
}


/* 2. THE DESKTOP "FANDOM CARD" FIX (1024px+) */
/* 2. THE DESKTOP CARD LOOK (1024px+) */
@media screen and (min-width: 1024px) {
@media screen and (min-width: 1024px) {
    /* The container for everything */
     #cosmos-content {
     #cosmos-content, .mw-body {
         width: 1200px !important;
         width: 1200px !important;
         margin: 40px auto !important;
         margin: 40px auto !important;
        background: transparent !important;
         display: block !important;
        border: none !important;
         overflow: visible !important;
         display: block !important; /* Resetting flex/grid to prevent bugs */
         overflow: hidden !important;
     }
     }


    /* The Main Article Card (Left) */
     #cosmos-content-main {
     #cosmos-content-main, #bodyContent {
         width: 860px !important;
         width: 860px !important;
         float: left !important;
         float: left !important;
Line 40: Line 38:
     }
     }


    /* The Sidebar Card (Right Rail) */
     #cosmos-right-rail {
     #cosmos-right-rail {
         width: 320px !important;
         width: 310px !important;
         float: right !important;
         float: right !important;
         background: #ffffff !important;
         background: #ffffff !important;
Line 49: Line 46:
         box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
         box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
         box-sizing: border-box !important;
         box-sizing: border-box !important;
        display: block !important;
    }
}
/* 3. THE MOBILE "FANDOM CARD" FIX (Under 1024px) */
@media screen and (max-width: 1023px) {
    #cosmos-content, .mw-body {
        width: 100% !important;
        padding: 10px !important;
        display: block !important;
    }
    #cosmos-content-main {
        width: 100% !important;
        background: #ffffff !important;
        padding: 20px !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
        box-sizing: border-box !important;
    }
    #cosmos-right-rail {
        width: 100% !important;
        margin-top: 20px !important;
        float: none !important;
     }
     }
}
}


/* 4. INFOBOX: FORCING SAME-LINE ALIGNMENT */
/* 3. INFOBOX ALIGNMENT (The Miraheze Fix) */
.portable-infobox {
.portable-infobox {
     background-color: #fff !important;
     background-color: var(--kh-data-bg) !important;
     border: var(--kh-border) !important;
     border: var(--kh-border) !important;
     width: 300px !important;
     width: 300px !important;
     float: right !important;
     float: right !important;
     margin: 0 0 1em 1em !important;
     margin: 0 0 1em 1em !important;
    border-collapse: collapse !important;
}
}
.portable-infobox .pi-title {
.portable-infobox .pi-title {
     background-color: var(--kh-yellow) !important;
     background-color: var(--kh-yellow) !important;
Line 89: Line 65:
     padding: 10px !important;
     padding: 10px !important;
     text-align: center !important;
     text-align: center !important;
    border-bottom: var(--kh-border) !important;
}
}
.portable-infobox .pi-header {
.portable-infobox .pi-header {
     background-color: var(--kh-green) !important;
     background-color: var(--kh-green) !important;
     color: #ffffff !important;
     color: #ffffff !important;
     font-family: 'Cinzel', serif !important;
     font-family: 'Cinzel', serif !important;
    padding: 6px !important;
    text-align: center !important;
}
}


/* The Secret Sauce for Label Alignment */
/* Forces Label and Data to be side-by-side using Table Cells */
.pi-item.pi-data {
.pi-item.pi-data {
     display: table !important; /* Table layout is the most stable for labels */
     display: table !important;
     width: 100% !important;
     width: 100% !important;
     border-bottom: 1px solid #eee;
     border-bottom: 1px solid #ddd;
}
}
.pi-data-label {
.pi-data-label {
     display: table-cell !important;
     display: table-cell !important;
     width: 40% !important;
     width: 40% !important;
     background-color: #f9f9f9 !important;
     background-color: var(--kh-label-bg) !important;
     padding: 8px !important;
     padding: 8px !important;
     font-weight: bold;
     font-family: 'Cinzel', serif !important;
     border-right: 1px solid #eee;
    font-size: 0.8em !important;
     border-right: 1px solid #ddd;
    vertical-align: middle;
}
}
.pi-data-value {
.pi-data-value {
     display: table-cell !important;
     display: table-cell !important;
    width: 60% !important;
     padding: 8px !important;
     padding: 8px !important;
     width: 60% !important;
     background-color: var(--kh-data-bg) !important;
    vertical-align: middle;
}
}


/* 5. KH LEAF HEADERS */
/* 4. HEADERS & ICONS */
h1, h2, h3, .mw-headline {  
h1, h2, h3, .mw-headline {  
     color: var(--kh-green) !important;  
     color: var(--kh-green) !important;  
Line 123: Line 109:
h2::before, h3::before { content: "\1F343\0020" !important; }
h2::before, h3::before { content: "\1F343\0020" !important; }


/* 6. NAV HEADER */
/* 5. SITE NAVIGATION */
#cosmos-header, .header-container {
#cosmos-header, .header-container {
     background-color: var(--kh-green) !important;
     background-color: var(--kh-green) !important;
     border-bottom: 3px solid var(--kh-yellow) !important;
     border-bottom: 3px solid var(--kh-yellow) !important;
}
/* 6. MOBILE RESPONSIVENESS */
@media screen and (max-width: 1023px) {
    #cosmos-content-main {
        width: 100% !important;
        padding: 20px !important;
        border-radius: 8px !important;
    }
    .portable-infobox {
        width: 100% !important;
        float: none !important;
        margin: 10px 0 !important;
    }
}
}

Revision as of 23:50, 16 March 2026

/* Version 9.0 - Miraheze Reconstruction (Stable Build) */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Crimson+Pro:wght@400;700&display=swap');

:root {
    --kh-green: #3e5a47 !important;
    --kh-yellow: #ffd700 !important;
    --kh-dark-text: #2d4234 !important;
    --kh-light-bg: #f9fdfa !important;
    --kh-label-bg: #f2f2f2 !important;
    --kh-data-bg: #ffffff !important;
    --kh-border: 2px solid #3e5a47 !important;
}

/* 1. GLOBAL LAYOUT & BACKGROUND */
body, html, #cosmos-content-wrapper { 
    background-color: var(--kh-light-bg) !important; 
    font-family: 'Crimson Pro', serif !important;
}

/* 2. THE DESKTOP CARD LOOK (1024px+) */
@media screen and (min-width: 1024px) {
    #cosmos-content {
        width: 1200px !important;
        margin: 40px auto !important;
        display: block !important;
        overflow: visible !important;
    }

    #cosmos-content-main {
        width: 860px !important;
        float: left !important;
        background: #ffffff !important;
        padding: 40px !important;
        border-radius: 4px !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
        box-sizing: border-box !important;
        min-height: 800px;
    }

    #cosmos-right-rail {
        width: 310px !important;
        float: right !important;
        background: #ffffff !important;
        padding: 20px !important;
        border-radius: 4px !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
        box-sizing: border-box !important;
    }
}

/* 3. INFOBOX ALIGNMENT (The Miraheze Fix) */
.portable-infobox {
    background-color: var(--kh-data-bg) !important;
    border: var(--kh-border) !important;
    width: 300px !important;
    float: right !important;
    margin: 0 0 1em 1em !important;
    border-collapse: collapse !important;
}

.portable-infobox .pi-title {
    background-color: var(--kh-yellow) !important;
    color: var(--kh-dark-text) !important;
    font-family: 'Cinzel', serif !important;
    padding: 10px !important;
    text-align: center !important;
    border-bottom: var(--kh-border) !important;
}

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

/* Forces Label and Data to be side-by-side using Table Cells */
.pi-item.pi-data {
    display: table !important;
    width: 100% !important;
    border-bottom: 1px solid #ddd;
}

.pi-data-label {
    display: table-cell !important;
    width: 40% !important;
    background-color: var(--kh-label-bg) !important;
    padding: 8px !important;
    font-family: 'Cinzel', serif !important;
    font-size: 0.8em !important;
    border-right: 1px solid #ddd;
    vertical-align: middle;
}

.pi-data-value {
    display: table-cell !important;
    width: 60% !important;
    padding: 8px !important;
    background-color: var(--kh-data-bg) !important;
    vertical-align: middle;
}

/* 4. HEADERS & ICONS */
h1, h2, h3, .mw-headline { 
    color: var(--kh-green) !important; 
    font-family: 'Cinzel', serif !important; 
}
h2::before, h3::before { content: "\1F343\0020" !important; }

/* 5. SITE NAVIGATION */
#cosmos-header, .header-container {
    background-color: var(--kh-green) !important;
    border-bottom: 3px solid var(--kh-yellow) !important;
}

/* 6. MOBILE RESPONSIVENESS */
@media screen and (max-width: 1023px) {
    #cosmos-content-main {
        width: 100% !important;
        padding: 20px !important;
        border-radius: 8px !important;
    }
    .portable-infobox {
        width: 100% !important;
        float: none !important;
        margin: 10px 0 !important;
    }
}