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 (GRID LAYOUT) --- */ | ||
.infobox { | .infobox { | ||
| Line 10: | Line 10: | ||
font-size: 0.9rem; | font-size: 0.9rem; | ||
/* | /* 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 | /* GRID ROW SYSTEM (The Alignment Fix) */ | ||
.infobox-row { | .infobox-row { | ||
display: | display: grid; /* <--- This is the magic */ | ||
grid-template-columns: 110px 1fr; /* Col 1 is 110px fixed, Col 2 is flexible */ | |||
align-items: | 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 | /* 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; | ||
/* 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 */ | |||
word-break: break-word; /* | |||
} | } | ||
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);
}