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


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


Line 33: Line 31:
}
}


/* GRID ROW (The Fix) */
/* ROW (Acts like a Table Row <tr>) */
.infobox-row {
.infobox-row {
     display: grid;
     display: table;       /* <--- The Fix */
    /* CHANGE: 110px fixed left, flexible right that CAN shrink to 0 if needed */
     table-layout: fixed;   /* Forces strict width respecting */
     grid-template-columns: 110px minmax(0, 1fr);  
     width: 100%;           /* Fills the 300px box completely */
     gap: 10px;
    align-items: start;
      
      
     padding: 10px 12px;
     padding: 0;           /* Reset padding, handled by cells below */
     border-bottom: 1px solid var(--border-color-subtle, #eaecf0);
     border-bottom: 1px solid var(--border-color-subtle, #eaecf0);
    text-align: left;
    box-sizing: border-box;
}
}


/* LABEL */
/* LABEL (Acts like a Cell <td>) */
.infobox-label {
.infobox-label {
    display: table-cell;  /* <--- The Fix */
    width: 110px;          /* Rigid fixed width */
    vertical-align: top;  /* Aligns text to top */
   
    padding: 10px 0 10px 12px; /* Top/Bottom/Left padding */
     font-weight: 600;
     font-weight: 600;
     opacity: 0.8;
     opacity: 0.8;
    word-wrap: break-word;
}
}


/* VALUE */
/* VALUE (Acts like the second Cell <td>) */
.infobox-row > span:last-child {
.infobox-row > span:last-child {
     /* Forces long words (like URLs) to break */
     display: table-cell;  /* <--- The Fix */
     overflow-wrap: anywhere;
     vertical-align: top;
     word-break: break-word;
   
    padding: 10px 12px 10px 10px; /* Top/Bottom/Right padding */
     word-break: break-word; /* Prevents long URLs from breaking layout */
}
}



Revision as of 01:58, 29 December 2025

/* --- CITIZEN INFOBOX (CSS TABLE FIX) --- */

.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; 
}

/* ROW (Acts like a Table Row <tr>) */
.infobox-row {
    display: table;        /* <--- The Fix */
    table-layout: fixed;   /* Forces strict width respecting */
    width: 100%;           /* Fills the 300px box completely */
    
    padding: 0;            /* Reset padding, handled by cells below */
    border-bottom: 1px solid var(--border-color-subtle, #eaecf0);
}

/* LABEL (Acts like a Cell <td>) */
.infobox-label {
    display: table-cell;   /* <--- The Fix */
    width: 110px;          /* Rigid fixed width */
    vertical-align: top;   /* Aligns text to top */
    
    padding: 10px 0 10px 12px; /* Top/Bottom/Left padding */
    font-weight: 600;
    opacity: 0.8;
}

/* VALUE (Acts like the second Cell <td>) */
.infobox-row > span:last-child {
    display: table-cell;   /* <--- The Fix */
    vertical-align: top;
    
    padding: 10px 12px 10px 10px; /* Top/Bottom/Right padding */
    word-break: break-word; /* Prevents long URLs 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);
}