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:
/* --- CITIZEN NATIVE INFOBOX --- */
/* --- CITIZEN INFOBOX (STRICT ALIGNMENT FIX) --- */


.infobox {
.infobox {
Line 10: Line 10:
     font-size: 0.9rem;
     font-size: 0.9rem;
      
      
     /* THE MAGIC PART: Use Citizen's variables */
     /* Colors */
    /* This automatically turns Dark Grey in Dark Mode and White in Light Mode */
     background-color: var(--background-color-surface, #fff);  
     background-color: var(--background-color-surface, #fff);  
     border: 1px solid var(--border-color-base, #eaecf0);
     border: 1px solid var(--border-color-base, #eaecf0);
Line 21: Line 20:
}
}


/* Header: Liquipedia Blue */
/* 1. HEADER: Force Centered Text */
.infobox-header {
.infobox-header {
     text-align: center;
    display: block; /* Ensures text-align works */
     text-align: center !important; /* Forces Center alignment */
     font-weight: bold;
     font-weight: bold;
     padding: 12px;
     padding: 12px;
     font-size: 1.1rem;
     font-size: 1.1rem;
      
      
    /* We force Blue, but use a variable for text to be safe */
     background-color: #2b7bb9;  
     background-color: #2b7bb9;  
     color: #ffffff;  
     color: #ffffff;  
}
}


/* Image Area */
/* 2. ROWS: Force Left Alignment */
.infobox-image {
    text-align: center;
    padding: 15px 0;
   
    /* Match the box background */
    background-color: var(--background-color-surface, #fff);
    border-bottom: 1px solid var(--border-color-subtle, #eaecf0);
}
 
/* Rows */
.infobox-row {
.infobox-row {
     display: flex;
     display: flex;
     flex-direction: row;
     flex-direction: row;
    align-items: center; /* Vertically centers text if one side is taller */
     padding: 10px 12px;
     padding: 10px 12px;
     border-bottom: 1px solid var(--border-color-subtle, #eaecf0);
     border-bottom: 1px solid var(--border-color-subtle, #eaecf0);
    text-align: left !important; /* Resets alignment to Left for rows */
}
}


/* 3. LABEL COLUMN (Fixed Width) */
.infobox-label {
.infobox-label {
     width: 90px;
     width: 90px;
Line 57: Line 49:
     font-weight: 600;
     font-weight: 600;
     opacity: 0.8;
     opacity: 0.8;
    flex-shrink: 0; /* Prevents label from getting squished */
}
}


/* --- DARK MODE HEADER OVERRIDE --- */
/* 4. VALUE COLUMN (Fills remaining space) */
/* We only need to override the Header Blue, because everything else
/* This targets the second span (the value) to ensure it acts as a neat column */
  above updates automatically thanks to the variables. */
.infobox-row > span:last-child {
    flex-grow: 1;
    word-break: break-word; /* Prevents long names from breaking layout */
}
 
/* Image Area */
.infobox-image {
    text-align: center;
    padding: 15px 0;
    background-color: var(--background-color-surface, #fff);
    border-bottom: 1px solid var(--border-color-subtle, #eaecf0);
}


/* Dark Mode Header Override */
html.skin-citizen-dark .infobox-header,
html.skin-citizen-dark .infobox-header,
html[data-theme="dark"] .infobox-header {
html[data-theme="dark"] .infobox-header {
     background-color: #3a6c8e; /* Muted Blue for Dark Mode */
     background-color: #3a6c8e;  
     border-bottom: 1px solid var(--border-color-base);
     border-bottom: 1px solid var(--border-color-base);
}
}

Revision as of 01:41, 29 December 2025

/* --- CITIZEN INFOBOX (STRICT ALIGNMENT FIX) --- */

.infobox {
    float: right;
    clear: right;
    width: 300px;
    padding: 0;
    margin-left: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    
    /* Colors */
    background-color: var(--background-color-surface, #fff); 
    border: 1px solid var(--border-color-base, #eaecf0);
    color: var(--color-base, #222);
    
    border-radius: var(--border-radius-base, 4px);
    box-shadow: var(--box-shadow-card, 0 1px 2px rgba(0,0,0,0.1));
    overflow: hidden;
}

/* 1. HEADER: Force Centered Text */
.infobox-header {
    display: block; /* Ensures text-align works */
    text-align: center !important; /* Forces Center alignment */
    font-weight: bold;
    padding: 12px;
    font-size: 1.1rem;
    
    background-color: #2b7bb9; 
    color: #ffffff; 
}

/* 2. ROWS: Force Left Alignment */
.infobox-row {
    display: flex;
    flex-direction: row;
    align-items: center; /* Vertically centers text if one side is taller */
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color-subtle, #eaecf0);
    text-align: left !important; /* Resets alignment to Left for rows */
}

/* 3. LABEL COLUMN (Fixed Width) */
.infobox-label {
    width: 90px;
    min-width: 90px;
    padding-right: 12px;
    font-weight: 600;
    opacity: 0.8;
    flex-shrink: 0; /* Prevents label from getting squished */
}

/* 4. VALUE COLUMN (Fills remaining space) */
/* This targets the second span (the value) to ensure it acts as a neat column */
.infobox-row > span:last-child {
    flex-grow: 1;
    word-break: break-word; /* Prevents long names from breaking layout */
}

/* Image Area */
.infobox-image {
    text-align: center;
    padding: 15px 0;
    background-color: var(--background-color-surface, #fff);
    border-bottom: 1px solid var(--border-color-subtle, #eaecf0);
}

/* Dark Mode Header Override */
html.skin-citizen-dark .infobox-header,
html[data-theme="dark"] .infobox-header {
    background-color: #3a6c8e; 
    border-bottom: 1px solid var(--border-color-base);
}