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


.infobox {
.infobox {
    /* 1. LAYOUT & POSITION */
     float: right;
     float: right;
     clear: right;
     clear: right;
     width: 300px;
     width: 300px;
     padding: 0;
     max-width: 100%; /* Prevents it from being wider than screen on mobile */
     margin-left: 1rem;
     margin-left: 1rem;
     margin-bottom: 1rem;
     margin-bottom: 1rem;
     font-size: 0.9rem;
     padding: 0;
      
      
     /* Skin Integration */
     /* 2. COLORS & SKIN (Using Citizen Variables) */
     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 17: Line 18:
     border-radius: var(--border-radius-base, 4px);
     border-radius: var(--border-radius-base, 4px);
     box-shadow: var(--box-shadow-card, 0 1px 2px rgba(0,0,0,0.1));
     box-shadow: var(--box-shadow-card, 0 1px 2px rgba(0,0,0,0.1));
     overflow: hidden;
     overflow: hidden; /* Cuts off any stray content */
    box-sizing: border-box; /* Crucial: Keeps width exactly 300px */
}
}


Line 31: Line 33:
}
}


/* GRID ROW SYSTEM (The Alignment Fix) */
/* GRID ROW (The Fix) */
.infobox-row {
.infobox-row {
     display: grid; /* <--- This is the magic */
     display: grid;
     grid-template-columns: 110px 1fr; /* Col 1 is 110px fixed, Col 2 is flexible */
    /* CHANGE: 110px fixed left, flexible right that CAN shrink to 0 if needed */
     gap: 10px; /* Space between label and value */
     grid-template-columns: 110px minmax(0, 1fr);  
     align-items: start; /* Aligns text to top */
     gap: 10px;
     align-items: start;
      
      
     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;
     text-align: left;
    box-sizing: border-box;
}
}


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


/* VALUE */
/* VALUE */
.infobox-row > span:last-child {
.infobox-row > span:last-child {
     word-break: break-word; /* Prevents long names from breaking layout */
    /* Forces long words (like URLs) to break */
    overflow-wrap: anywhere;
     word-break: break-word;
}
}



Revision as of 01:56, 29 December 2025

/* --- CITIZEN INFOBOX (SCROLLBAR FIX) --- */

.infobox {
    /* 1. LAYOUT & POSITION */
    float: right;
    clear: right;
    width: 300px;
    max-width: 100%; /* Prevents it from being wider than screen on mobile */
    margin-left: 1rem;
    margin-bottom: 1rem;
    padding: 0;
    
    /* 2. COLORS & SKIN (Using Citizen Variables) */
    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; /* Cuts off any stray content */
    box-sizing: border-box; /* Crucial: Keeps width exactly 300px */
}

/* 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 (The Fix) */
.infobox-row {
    display: grid;
    /* CHANGE: 110px fixed left, flexible right that CAN shrink to 0 if needed */
    grid-template-columns: 110px minmax(0, 1fr); 
    gap: 10px;
    align-items: start;
    
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color-subtle, #eaecf0);
    text-align: left;
    box-sizing: border-box;
}

/* LABEL */
.infobox-label {
    font-weight: 600;
    opacity: 0.8;
    word-wrap: break-word;
}

/* VALUE */
.infobox-row > span:last-child {
    /* Forces long words (like URLs) to break */
    overflow-wrap: anywhere;
    word-break: break-word;
}

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