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


.infobox {
.infobox {
Line 10: Line 10:
     font-size: 0.9rem;
     font-size: 0.9rem;
      
      
     /* Colors */
     /* Colors & Skin Integration */
     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 20: Line 20:
}
}


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


/* 2. ROWS: Force Left Alignment */
/* ROW CONTAINER */
.infobox-row {
.infobox-row {
     display: flex;
     display: flex; /* Enables columns */
     flex-direction: row;
     flex-direction: row;
     align-items: center; /* Vertically centers text if one side is taller */
     align-items: flex-start; /* Aligns text to top */
     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 */
     text-align: left;
}
}


/* 3. LABEL COLUMN (Fixed Width) */
/* LABEL COLUMN (THE FIX) */
.infobox-label {
.infobox-label {
     width: 90px;
    /* 0 grow, 0 shrink, 110px basis */
     min-width: 90px;
    flex: 0 0 110px;
     padding-right: 12px;
   
    /* Double safety to force width */
     width: 110px;
     min-width: 110px;
   
     padding-right: 10px;
     font-weight: 600;
     font-weight: 600;
     opacity: 0.8;
     opacity: 0.8;
    flex-shrink: 0; /* Prevents label from getting squished */
}
}


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


/* Image Area */
/* IMAGE */
.infobox-image {
.infobox-image {
     text-align: center;
     text-align: center;
Line 67: Line 69:
}
}


/* Dark Mode Header Override */
/* DARK MODE OVERRIDES */
html.skin-citizen-dark .infobox-header,
html.skin-citizen-dark .infobox-header,
html[data-theme="dark"] .infobox-header {
html[data-theme="dark"] .infobox-header {

Revision as of 01:43, 29 December 2025

/* --- CITIZEN INFOBOX (RIGID COLUMNS) --- */

.infobox {
    float: right;
    clear: right;
    width: 300px;
    padding: 0;
    margin-left: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    
    /* Colors & Skin Integration */
    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;
}

/* HEADER */
.infobox-header {
    display: block;
    text-align: center !important;
    font-weight: bold;
    padding: 12px;
    font-size: 1.1rem;
    background-color: #2b7bb9; 
    color: #ffffff; 
}

/* ROW CONTAINER */
.infobox-row {
    display: flex; /* Enables columns */
    flex-direction: row;
    align-items: flex-start; /* Aligns text to top */
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color-subtle, #eaecf0);
    text-align: left;
}

/* LABEL COLUMN (THE FIX) */
.infobox-label {
    /* 0 grow, 0 shrink, 110px basis */
    flex: 0 0 110px; 
    
    /* Double safety to force width */
    width: 110px;
    min-width: 110px;
    
    padding-right: 10px;
    font-weight: 600;
    opacity: 0.8;
}

/* VALUE COLUMN */
.infobox-row > span:last-child {
    flex: 1; /* Takes up all remaining space */
    word-break: break-word; /* Wraps long text */
}

/* IMAGE */
.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 OVERRIDES */
html.skin-citizen-dark .infobox-header,
html[data-theme="dark"] .infobox-header {
    background-color: #3a6c8e; 
    border-bottom: 1px solid var(--border-color-base);
}