MediaWiki:Common.css: Difference between revisions

From Lenn's Fun Stuff

No edit summary
No edit summary
Tags: Mobile edit Mobile web edit
Line 1: Line 1:
/* Version 7.0 - The "True Fandom" KH Overhaul */
/* Version 8.0 - FINAL FANDOM OVERHAUL (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: #f2f6f3 !important; /* Slightly darker for better card contrast */
     --kh-light-bg: #e9efe9 !important; /* Darker background to make white cards "pop" */
     --kh-border: 2px solid #3e5a47 !important;
     --kh-border: 2px solid #3e5a47 !important;
}
}


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


/* 2. THE FANDOM CARD LAYOUT (Desktop) */
/* 2. THE DESKTOP "FANDOM CARD" FIX (1024px+) */
@media screen and (min-width: 1024px) {
@media screen and (min-width: 1024px) {
    /* The container for everything */
     #cosmos-content, .mw-body {
     #cosmos-content, .mw-body {
        display: flex !important;
        justify-content: center !important;
        align-items: flex-start !important;
        gap: 20px !important;
         width: 1200px !important;
         width: 1200px !important;
         margin: 40px auto !important;
         margin: 40px auto !important;
         background: transparent !important; /* Makes the cards "float" */
         background: transparent !important;
        border: none !important;
        display: block !important; /* Resetting flex/grid to prevent bugs */
        overflow: hidden !important;
     }
     }


    /* The Main Article Card (Left) */
     #cosmos-content-main, #bodyContent {
     #cosmos-content-main, #bodyContent {
         flex: 0 0 840px !important;
         width: 860px !important;
        float: left !important;
         background: #ffffff !important;
         background: #ffffff !important;
         padding: 40px !important;
         padding: 40px !important;
Line 36: Line 37:
         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;
        min-height: 800px;
     }
     }


    /* The Sidebar Card (Right Rail) */
     #cosmos-right-rail {
     #cosmos-right-rail {
         flex: 0 0 320px !important;
         width: 320px !important;
        float: right !important;
         background: #ffffff !important;
         background: #ffffff !important;
         padding: 20px !important;
         padding: 20px !important;
         border-radius: 4px !important;
         border-radius: 4px !important;
         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;
         display: block !important;
         display: block !important;
     }
     }
}
}


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


/* 4. PORTABLE INFOBOXES (Alignment & Color Fix) */
/* 4. INFOBOX: FORCING SAME-LINE ALIGNMENT */
.portable-infobox {
.portable-infobox {
     background-color: #fff !important;
     background-color: #fff !important;
Line 86: Line 94:
     color: #ffffff !important;
     color: #ffffff !important;
     font-family: 'Cinzel', serif !important;
     font-family: 'Cinzel', serif !important;
    text-align: center !important;
}
}


/* FORCING LABEL & DATA ON THE SAME LINE */
/* The Secret Sauce for Label Alignment */
.pi-item.pi-data {
.pi-item.pi-data {
     display: flex !important;
     display: table !important; /* Table layout is the most stable for labels */
     flex-flow: row nowrap !important;
     width: 100% !important;
     border-bottom: 1px solid #eeeeee !important;
     border-bottom: 1px solid #eee;
}
}
.pi-data-label {
.pi-data-label {
     flex: 0 0 45% !important; /* Exact width for the left side */
     display: table-cell !important;
    width: 40% !important;
     background-color: #f9f9f9 !important;
     background-color: #f9f9f9 !important;
     padding: 8px !important;
     padding: 8px !important;
     font-family: 'Cinzel', serif !important;
     font-weight: bold;
    font-size: 0.85em !important;
     border-right: 1px solid #eee;
     border-right: 1px solid #eeeeee !important;
}
}
.pi-data-value {
.pi-data-value {
     flex: 1 !important; /* Takes up the remaining space */
     display: table-cell !important;
     padding: 8px !important;
     padding: 8px !important;
     background: #fff !important;
     width: 60% !important;
}
}


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


/* 6. HEADER CUSTOMIZATION */
/* 6. NAV HEADER */
#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;
}
}

Revision as of 23:47, 16 March 2026

/* Version 8.0 - FINAL FANDOM OVERHAUL (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: #e9efe9 !important; /* Darker background to make white cards "pop" */
    --kh-border: 2px solid #3e5a47 !important;
}

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

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

    /* The Main Article Card (Left) */
    #cosmos-content-main, #bodyContent {
        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;
    }

    /* The Sidebar Card (Right Rail) */
    #cosmos-right-rail {
        width: 320px !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;
        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 */
.portable-infobox {
    background-color: #fff !important;
    border: var(--kh-border) !important;
    width: 300px !important;
    float: right !important;
    margin: 0 0 1em 1em !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;
}
.portable-infobox .pi-header {
    background-color: var(--kh-green) !important;
    color: #ffffff !important;
    font-family: 'Cinzel', serif !important;
}

/* The Secret Sauce for Label Alignment */
.pi-item.pi-data {
    display: table !important; /* Table layout is the most stable for labels */
    width: 100% !important;
    border-bottom: 1px solid #eee;
}
.pi-data-label {
    display: table-cell !important;
    width: 40% !important;
    background-color: #f9f9f9 !important;
    padding: 8px !important;
    font-weight: bold;
    border-right: 1px solid #eee;
}
.pi-data-value {
    display: table-cell !important;
    padding: 8px !important;
    width: 60% !important;
}

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

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