Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.css: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
Line 1: Line 1:
/* --- INFOBOX BASE STYLES (Layout & Shape) --- */
/* --- 1. BASE LAYOUT (Shape & Position) --- */
.infobox {
.infobox {
     float: right;
     float: right;
     clear: right;
     clear: right;
     width: 300px;
     width: 300px;
    border: 1px solid; /* Color defined below */
     padding: 0;
     padding: 0;
     margin-left: 1em;
     margin-left: 1em;
Line 10: Line 9:
     font-size: 90%;
     font-size: 90%;
     box-shadow: 0 2px 4px rgba(0,0,0,0.1);
     box-shadow: 0 2px 4px rgba(0,0,0,0.1);
     border-radius: 4px; /* Slight rounding for modern look */
     border-radius: 4px;
     overflow: hidden;   /* Keeps content inside rounded corners */
     overflow: hidden;
   
    /* Default Light Mode Colors */
    background-color: #f8f9fa;
    border: 1px solid #a2a9b1;
    color: #202122;
}
}


Line 19: Line 23:
     padding: 10px;
     padding: 10px;
     font-size: 1.2em;
     font-size: 1.2em;
   
    /* Default Light Mode Colors */
    background-color: #2b7bb9; /* Liquipedia Blue */
    color: #ffffff;
     border-bottom: 1px solid rgba(0,0,0,0.1);
     border-bottom: 1px solid rgba(0,0,0,0.1);
}
}
Line 25: Line 33:
     text-align: center;
     text-align: center;
     padding: 15px 0;
     padding: 15px 0;
     border-bottom: 1px solid rgba(0,0,0,0.05);
   
    /* Default Light Mode Colors */
    background-color: #ffffff;
     border-bottom: 1px solid #eaecf0;
}
}


Line 32: Line 43:
     flex-direction: row;
     flex-direction: row;
     padding: 8px 10px;
     padding: 8px 10px;
     border-bottom: 1px solid rgba(0,0,0,0.05);
   
    line-height: 1.4em;
    /* Default Light Mode Colors */
     border-bottom: 1px solid #eaecf0;
}
}


Line 41: Line 53:
     padding-right: 10px;
     padding-right: 10px;
     font-weight: bold;
     font-weight: bold;
     opacity: 0.85; /* Makes label slightly softer than value */
     opacity: 0.85;
}
}


/* --- THEME COLORS: LIGHT MODE (Liquipedia Style) --- */
/* --- 2. DARK MODE OVERRIDES --- */
.infobox {
 
     background-color: #f8f9fa;
/* This targets the specific "Night Mode" class used by modern MediaWiki skins */
     border-color: #a2a9b1;
html.skin-theme-client-pref-night .infobox {
     color: #202122;
     background-color: #202124 !important;
     border-color: #4a4d50 !important;
    color: #eaecf0 !important;
}
 
html.skin-theme-client-pref-night .infobox-header {
    background-color: #3a6c8e !important; /* Muted Blue */
     color: #ffffff !important;
    border-bottom: 1px solid #4a4d50 !important;
}
}


.infobox-header {
html.skin-theme-client-pref-night .infobox-image {
     background-color: #2b7bb9; /* Liquipedia Blue */
     background-color: #1a1a1a !important; /* Dark background for transparent PNGs */
     color: #ffffff;
     border-bottom: 1px solid #4a4d50 !important;
}
}


.infobox-image {
html.skin-theme-client-pref-night .infobox-row {
     background-color: #ffffff;
     border-bottom: 1px solid #36393d !important;
}
}


/* --- THEME COLORS: DARK MODE --- */
/* Also support OS-level Dark Mode preference */
/* This works for Minerva Neue, Vector 2022, and standard Dark Mode extensions */
@media screen and (prefers-color-scheme: dark) {
@media screen and (prefers-color-scheme: dark), class:skin-theme-client-pref-night {
    html.skin-theme-client-pref-os .infobox {
    .infobox {
         background-color: #202124;
         background-color: #202124; /* Deep Grey Background */
         border-color: #4a4d50;
         border-color: #4a4d50;
         color: #eaecf0;
         color: #eaecf0;
     }
     }
 
     html.skin-theme-client-pref-os .infobox-header {
     .infobox-header {
         background-color: #3a6c8e;
         background-color: #3a6c8e; /* Muted Blue for readability */
        color: #ffffff;
         border-bottom: 1px solid #4a4d50;
         border-bottom: 1px solid #4a4d50;
     }
     }
 
     html.skin-theme-client-pref-os .infobox-image {
     .infobox-image {
         background-color: #1a1a1a;
         background-color: #1a1a1a; /* Almost Black behind image */
         border-bottom: 1px solid #4a4d50;
         border-bottom: 1px solid #4a4d50;
     }
     }
      
     html.skin-theme-client-pref-os .infobox-row {
    .infobox-row {
         border-bottom: 1px solid #36393d;
         border-bottom: 1px solid #36393d;
     }
     }
}
}

Revision as of 01:35, 29 December 2025

/* --- 1. BASE LAYOUT (Shape & Position) --- */
.infobox {
    float: right;
    clear: right;
    width: 300px;
    padding: 0;
    margin-left: 1em;
    margin-bottom: 1em;
    font-size: 90%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
    
    /* Default Light Mode Colors */
    background-color: #f8f9fa;
    border: 1px solid #a2a9b1;
    color: #202122;
}

.infobox-header {
    text-align: center;
    font-weight: bold;
    padding: 10px;
    font-size: 1.2em;
    
    /* Default Light Mode Colors */
    background-color: #2b7bb9; /* Liquipedia Blue */
    color: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.infobox-image {
    text-align: center;
    padding: 15px 0;
    
    /* Default Light Mode Colors */
    background-color: #ffffff;
    border-bottom: 1px solid #eaecf0;
}

.infobox-row {
    display: flex;
    flex-direction: row;
    padding: 8px 10px;
    
    /* Default Light Mode Colors */
    border-bottom: 1px solid #eaecf0;
}

.infobox-label {
    width: 90px;
    min-width: 90px;
    padding-right: 10px;
    font-weight: bold;
    opacity: 0.85;
}

/* --- 2. DARK MODE OVERRIDES --- */

/* This targets the specific "Night Mode" class used by modern MediaWiki skins */
html.skin-theme-client-pref-night .infobox {
    background-color: #202124 !important;
    border-color: #4a4d50 !important;
    color: #eaecf0 !important;
}

html.skin-theme-client-pref-night .infobox-header {
    background-color: #3a6c8e !important; /* Muted Blue */
    color: #ffffff !important;
    border-bottom: 1px solid #4a4d50 !important;
}

html.skin-theme-client-pref-night .infobox-image {
    background-color: #1a1a1a !important; /* Dark background for transparent PNGs */
    border-bottom: 1px solid #4a4d50 !important;
}

html.skin-theme-client-pref-night .infobox-row {
    border-bottom: 1px solid #36393d !important;
}

/* Also support OS-level Dark Mode preference */
@media screen and (prefers-color-scheme: dark) {
    html.skin-theme-client-pref-os .infobox {
        background-color: #202124;
        border-color: #4a4d50;
        color: #eaecf0;
    }
    html.skin-theme-client-pref-os .infobox-header {
        background-color: #3a6c8e;
        border-bottom: 1px solid #4a4d50;
    }
    html.skin-theme-client-pref-os .infobox-image {
        background-color: #1a1a1a;
        border-bottom: 1px solid #4a4d50;
    }
    html.skin-theme-client-pref-os .infobox-row {
        border-bottom: 1px solid #36393d;
    }
}