MediaWiki:Common.css: Difference between revisions
MediaWiki interface page
More actions
Esportsamaze (talk | contribs) No edit summary |
Esportsamaze (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
/* --- CITIZEN INFOBOX ( | /* --- CITIZEN INFOBOX (SCROLLBAR 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 */ | |||
margin-left: 1rem; | margin-left: 1rem; | ||
margin-bottom: 1rem; | margin-bottom: 1rem; | ||
padding: 0; | |||
/* | /* 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 | /* GRID ROW (The Fix) */ | ||
.infobox-row { | .infobox-row { | ||
display: grid; /* | display: grid; | ||
grid-template-columns: 110px 1fr; | /* CHANGE: 110px fixed left, flexible right that CAN shrink to 0 if needed */ | ||
gap: 10px; | grid-template-columns: 110px minmax(0, 1fr); | ||
align-items: start; | 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 { | ||
font-weight: 600; | font-weight: 600; | ||
opacity: 0.8; | opacity: 0.8; | ||
word-wrap: break-word; | |||
word-wrap: break-word; | |||
} | } | ||
/* VALUE */ | /* VALUE */ | ||
.infobox-row > span:last-child { | .infobox-row > span:last-child { | ||
word-break: break-word; | /* 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);
}