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 (RIGID COLUMNS) --- */
/* --- CITIZEN INFOBOX (GRID LAYOUT) --- */


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


/* ROW CONTAINER */
/* GRID ROW SYSTEM (The Alignment Fix) */
.infobox-row {
.infobox-row {
     display: flex; /* Enables columns */
     display: grid; /* <--- This is the magic */
     flex-direction: row;
    grid-template-columns: 110px 1fr; /* Col 1 is 110px fixed, Col 2 is flexible */
     align-items: flex-start; /* Aligns text to top */
     gap: 10px; /* Space between label and value */
     align-items: 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);
Line 41: Line 43:
}
}


/* LABEL COLUMN (THE FIX) */
/* LABEL */
.infobox-label {
.infobox-label {
     /* 0 grow, 0 shrink, 110px basis */
     /* No width needed here because the Grid parent controls it */
    flex: 0 0 110px;
   
    /* 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;
   
    /* Ensure long labels wrap properly */
    word-wrap: break-word;
}
}


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



Revision as of 01:45, 29 December 2025

/* --- CITIZEN INFOBOX (GRID LAYOUT) --- */

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

/* GRID ROW SYSTEM (The Alignment Fix) */
.infobox-row {
    display: grid; /* <--- This is the magic */
    grid-template-columns: 110px 1fr; /* Col 1 is 110px fixed, Col 2 is flexible */
    gap: 10px; /* Space between label and value */
    align-items: start; /* Aligns text to top */
    
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color-subtle, #eaecf0);
    text-align: left;
}

/* LABEL */
.infobox-label {
    /* No width needed here because the Grid parent controls it */
    font-weight: 600;
    opacity: 0.8;
    
    /* Ensure long labels wrap properly */
    word-wrap: break-word; 
}

/* VALUE */
.infobox-row > span:last-child {
    word-break: break-word; /* Prevents long names from breaking layout */
}

/* 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);
}