MediaWiki:Common.css: Difference between revisions
MediaWiki interface page
More actions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* ============================================================ | /* ============================================================ | ||
HERO TEMPLATE (Shared Infobox System) | |||
- Used by Skills + Passives (and future templates) | |||
- Dark mode = default styling | |||
- Light mode = overrides via .mw-theme-light (plus optional OS fallback) | |||
========================================================== */ | ========================================================== */ | ||
/* ------------------------------------------------------------ | |||
Global sizing tokens | |||
--------------------------------------------------------- */ | |||
:root { | :root { | ||
--sv- | --sv-infobox-max: 620px; /* shared fallback cap */ | ||
--sv-skill-width: 660px; | --sv-skill-width: 660px; /* skills pages + lists */ | ||
--sv- | --sv-passive-width: 540px; /* passives pages + lists (kept as-is for now) */ | ||
} | } | ||
/* Shared base */ | /* ------------------------------------------------------------ | ||
Shared base: both Skill + Passive tables | |||
--------------------------------------------------------- */ | |||
table.spiritvale-skill-infobox, | table.spiritvale-skill-infobox, | ||
table.spiritvale-passive-infobox { | table.spiritvale-passive-infobox { | ||
| Line 141: | Line 34: | ||
} | } | ||
/* Hero | /* Hero (title + description) band background */ | ||
table.spiritvale-skill-infobox > tbody > tr.spiritvale-infobox-main > th, | table.spiritvale-skill-infobox > tbody > tr.spiritvale-infobox-main > th, | ||
table.spiritvale-skill-infobox > tbody > tr.spiritvale-infobox-main > td, | table.spiritvale-skill-infobox > tbody > tr.spiritvale-infobox-main > td, | ||
| Line 157: | Line 50: | ||
} | } | ||
/* Row separators | /* Row separators */ | ||
table.spiritvale-skill-infobox > tbody > tr, | table.spiritvale-skill-infobox > tbody > tr, | ||
table.spiritvale-passive-infobox > tbody > tr { | table.spiritvale-passive-infobox > tbody > tr { | ||
border-bottom: 1px solid rgba(148, 163, 184, 0. | border-bottom: 1px solid rgba(148, 163, 184, 0.40); | ||
} | } | ||
table.spiritvale-skill-infobox > tbody > tr:last-child, | table.spiritvale-skill-infobox > tbody > tr:last-child, | ||
| Line 167: | Line 60: | ||
} | } | ||
/* Label/value | /* Label/value rows (shared default) */ | ||
table.spiritvale-skill-infobox > tbody > tr:not(.spiritvale-infobox-main) > th:not(.spiritvale-infobox-section-header), | table.spiritvale-skill-infobox > tbody > tr:not(.spiritvale-infobox-main) > th:not(.spiritvale-infobox-section-header), | ||
table.spiritvale-passive-infobox > tbody > tr:not(.spiritvale-infobox-main) > th:not(.spiritvale-infobox-section-header) { | table.spiritvale-passive-infobox > tbody > tr:not(.spiritvale-infobox-main) > th:not(.spiritvale-infobox-section-header) { | ||
| Line 191: | Line 84: | ||
} | } | ||
/* Hero helper classes (icon + title + description) */ | |||
/* Hero helper classes */ | |||
.spiritvale-infobox-main-left-inner { | .spiritvale-infobox-main-left-inner { | ||
display: flex; | display: flex; | ||
| Line 231: | Line 113: | ||
} | } | ||
/* Skill hero split-row tuning */ | |||
/* | |||
table.spiritvale-skill-infobox > tbody > tr.sv-hero-title-row { | table.spiritvale-skill-infobox > tbody > tr.sv-hero-title-row { | ||
border-bottom: none !important; | border-bottom: none !important; | ||
} | } | ||
table.spiritvale-skill-infobox > tbody > tr.sv-hero-title-row > th { | table.spiritvale-skill-infobox > tbody > tr.sv-hero-title-row > th { | ||
padding-bottom: 0.55em; | padding-bottom: 0.55em; | ||
} | } | ||
table.spiritvale-skill-infobox > tbody > tr.sv-hero-desc-row > td { | table.spiritvale-skill-infobox > tbody > tr.sv-hero-desc-row > td { | ||
padding-top: 0.55em; | padding-top: 0.55em; | ||
| Line 249: | Line 125: | ||
} | } | ||
/* ------------------------------------------------------------ | |||
/* | SKILLS: sizing + list wrapper behavior | ||
--------------------------------------------------------- */ | |||
table.spiritvale-skill-infobox { | table.spiritvale-skill-infobox { | ||
max-width: var(--sv-skill-width); | max-width: var(--sv-skill-width); | ||
margin: 1.25em auto; | margin: 1.25em auto; | ||
| Line 320: | Line 134: | ||
} | } | ||
/* List wrapper */ | /* List-mode wrapper: one outer panel, skills become rows inside it */ | ||
.sv-skill-collection { | .sv-skill-collection { | ||
width: 100%; | width: 100%; | ||
| Line 336: | Line 150: | ||
} | } | ||
/* Neutralize Citizen wrappers inside the | /* Neutralize Citizen wrappers inside the collection */ | ||
.sv-skill-collection .mw-table-wrapper, | .sv-skill-collection .mw-table-wrapper, | ||
.sv-skill-collection .table-overflow, | .sv-skill-collection .table-overflow, | ||
| Line 348: | Line 162: | ||
} | } | ||
/* | /* Remove each skill’s individual border/shadow when inside the list wrapper */ | ||
.sv-skill-collection table.spiritvale-skill-infobox { | .sv-skill-collection table.spiritvale-skill-infobox { | ||
width: 100%; | width: 100%; | ||
| Line 359: | Line 173: | ||
} | } | ||
/* Divider between | /* Divider between skill entries in list mode */ | ||
.sv-skill-collection > * + * { | .sv-skill-collection > * + * { | ||
border-top: 1px solid rgba(148, 163, 184, 0.25); | border-top: 1px solid rgba(148, 163, 184, 0.25); | ||
} | } | ||
/* ------------------------------------------------------------ | |||
/* | SKILLS: Hero Modules (4-slot scaffold) | ||
- Replaces the old “top band (nested-table)” system | |||
- Row contains a 2x2 grid of module boxes | |||
--------------------------------------------------------- */ | |||
table.spiritvale-skill-infobox . | table.spiritvale-skill-infobox tr.hero-modules-row > td.hero-modules-cell { | ||
padding: 0 !important; | padding: 0 !important; | ||
background: linear-gradient( | background: linear-gradient( | ||
| Line 378: | Line 192: | ||
} | } | ||
table.spiritvale-skill-infobox . | /* 2x2 grid of module boxes */ | ||
table.spiritvale-skill-infobox .hero-modules-grid { | |||
display: grid; | |||
grid-template-columns: 1fr 1fr; | |||
gap: 0; | |||
} | |||
/* Standard module box styling */ | |||
table.spiritvale-skill-infobox .hero-module { | |||
padding: 0.6em 0.75em; | |||
box-sizing: border-box; | |||
border-top: 1px solid rgba(148, 163, 184, 0.25); | |||
border-left: 1px solid rgba(148, 163, 184, 0.25); | |||
background: rgba(90, 78, 124, 0.18); | |||
} | } | ||
table.spiritvale-skill-infobox . | /* Grid borders: remove top border on first row; remove left border on first column */ | ||
table.spiritvale-skill-infobox .hero-module:nth-child(-n + 2) { | |||
border-top: none; | |||
} | |||
table.spiritvale-skill-infobox .hero-module:nth-child(odd) { | |||
border-left: none; | |||
} | } | ||
table.spiritvale-skill-infobox . | /* Empty slots still reserve vertical space for future modules */ | ||
table.spiritvale-skill-infobox .hero-module-empty .hero-module-body { | |||
min-height: 3.2em; | |||
} | } | ||
/* Level | /* ------------------------------------------------------------ | ||
table.spiritvale-skill-infobox .sv-level-ui { | SKILLS: Module 1 – Level Selector (self-contained) | ||
--------------------------------------------------------- */ | |||
table.spiritvale-skill-infobox .module-level-selector .sv-level-ui { | |||
width: 100%; | width: 100%; | ||
margin: 0 !important; | margin: 0 !important; | ||
display: flex; | display: flex; | ||
flex-direction: column; | flex-direction: column; | ||
| Line 410: | Line 234: | ||
} | } | ||
table.spiritvale-skill-infobox .sv-level-title { | table.spiritvale-skill-infobox .module-level-selector .sv-level-title { | ||
font-weight: 700; | font-weight: 700; | ||
text-transform: uppercase; | text-transform: uppercase; | ||
| Line 418: | Line 242: | ||
} | } | ||
table.spiritvale-skill-infobox .sv-level-label { | table.spiritvale-skill-infobox .module-level-selector .sv-level-label { | ||
font-weight: 600; | font-weight: 600; | ||
} | } | ||
table.spiritvale-skill-infobox .sv-level-slider input[type="range"] { | table.spiritvale-skill-infobox .module-level-selector .sv-level-slider input[type="range"] { | ||
width: 100%; | width: 100%; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
| Line 428: | Line 252: | ||
} | } | ||
/* ------------------------------------------------------------ | |||
/* | SKILLS: Module 2 – Skill Type (self-contained 2x2 grid) | ||
Type | --------------------------------------------------------- */ | ||
table.spiritvale-skill-infobox .module-skill-type .sv-type-grid { | |||
width: 100%; | |||
table.spiritvale-skill-infobox .sv-type-grid { | |||
width: 100% | |||
margin: 0 !important; | margin: 0 !important; | ||
padding: 0 | padding: 0; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
| Line 444: | Line 266: | ||
} | } | ||
table.spiritvale-skill-infobox .sv-type-chunk { | table.spiritvale-skill-infobox .module-skill-type .sv-type-chunk { | ||
display: flex; | display: flex; | ||
flex-direction: column; | flex-direction: column; | ||
| Line 457: | Line 279: | ||
} | } | ||
/* | /* Grid borders */ | ||
table.spiritvale-skill-infobox .sv-type-chunk:nth-child(-n + 2) { | table.spiritvale-skill-infobox .module-skill-type .sv-type-chunk:nth-child(-n + 2) { | ||
border-top: none; | border-top: none; | ||
} | } | ||
table.spiritvale-skill-infobox .sv-type-chunk:nth-child(odd) { | table.spiritvale-skill-infobox .module-skill-type .sv-type-chunk:nth-child(odd) { | ||
border-left: none; | border-left: none; | ||
} | } | ||
table.spiritvale-skill-infobox .sv-type-label { | table.spiritvale-skill-infobox .module-skill-type .sv-type-label { | ||
width: 100%; | width: 100%; | ||
padding: 0.18em 0.35em; | padding: 0.18em 0.35em; | ||
| Line 483: | Line 305: | ||
} | } | ||
table.spiritvale-skill-infobox .sv-type-value { | table.spiritvale-skill-infobox .module-skill-type .sv-type-value { | ||
margin-top: 0.2em; | margin-top: 0.2em; | ||
font-weight: 600; | font-weight: 600; | ||
| Line 493: | Line 315: | ||
} | } | ||
/* Mobile: stack | /* Mobile: modules stack to 1 column; type grid becomes 1 column */ | ||
@media (max-width: 560px) { | @media (max-width: 560px) { | ||
table.spiritvale-skill-infobox . | table.spiritvale-skill-infobox .hero-modules-grid { | ||
grid-template-columns: 1fr; | |||
} | |||
table.spiritvale-skill-infobox .hero-module { | |||
border-left: none; | |||
} | } | ||
table.spiritvale-skill-infobox . | table.spiritvale-skill-infobox .hero-module:first-child { | ||
border- | border-top: none; | ||
} | } | ||
table.spiritvale-skill-infobox .sv-type-grid { | table.spiritvale-skill-infobox .module-skill-type .sv-type-grid { | ||
grid-template-columns: 1fr; | grid-template-columns: 1fr; | ||
} | } | ||
/* | /* Simplify borders for 1-col type grid */ | ||
table.spiritvale-skill-infobox .sv-type-chunk { | table.spiritvale-skill-infobox .module-skill-type .sv-type-chunk { | ||
border-left: none; | border-left: none; | ||
} | } | ||
table.spiritvale-skill-infobox .sv-type-chunk:first-child { | table.spiritvale-skill-infobox .module-skill-type .sv-type-chunk:first-child { | ||
border-top: none; | border-top: none; | ||
} | } | ||
} | } | ||
/* ------------------------------------------------------------ | |||
PASSIVES (kept as-is for now) | |||
--------------------------------------------------------- */ | |||
table.spiritvale-passive-infobox { | |||
width: var(--sv-passive-width); | |||
max-width: var(--sv-passive-width); | |||
margin: 1em auto; | |||
table-layout: fixed; | |||
} | |||
/* Passive split hero rows (match Skills) */ | |||
table.spiritvale-passive-infobox > tbody > tr.sv-hero-title-row { | |||
border-bottom: none !important; | |||
} | |||
table.spiritvale-passive-infobox > tbody > tr.sv-hero-title-row > th { | |||
padding-bottom: 0.55em; | |||
} | |||
table.spiritvale-passive-infobox > tbody > tr.sv-hero-desc-row > td { | |||
padding-top: 0.55em; | |||
padding-bottom: 0.55em; | |||
} | |||
/* | /* Center + wrap passive body rows */ | ||
table.spiritvale-passive-infobox > tbody > tr:not(.spiritvale-infobox-main) > th, | |||
table.spiritvale-passive-infobox > tbody > tr:not(.spiritvale-infobox-main) > td { | |||
text-align: center; | |||
vertical-align: middle; | |||
white-space: normal; | |||
overflow-wrap: anywhere; | |||
word-break: break-word; | |||
} | |||
/* Passive section headers centered */ | |||
table.spiritvale-passive-infobox .spiritvale-infobox-section-header { | |||
text-align: center; | |||
} | |||
/* Passive list layout */ | |||
.spiritvale-passive-list { | |||
display: flex; | |||
flex-direction: column; | |||
align-items: center; | |||
gap: 1.25em; | |||
} | |||
/* | /* Remove Citizen wrapper borders/spacing around passive tables in lists */ | ||
.mw- | .spiritvale-passive-list .mw-table-wrapper, | ||
.spiritvale-passive-list .table-overflow, | |||
.spiritvale-passive-list .table-scroll, | |||
.spiritvale-passive-list .citizen-table { | |||
border: none !important; | |||
box-shadow: none !important; | |||
background: transparent !important; | |||
padding: 0 !important; | |||
margin: 0 !important; | |||
} | } | ||
/* | /* ------------------------------------------------------------ | ||
.mw-theme-light | LIGHT MODE OVERRIDES | ||
- Primary: .mw-theme-light (MediaWiki theme flag) | |||
- Optional fallback: OS prefers-color-scheme: light | |||
.mw-theme-light table.spiritvale-skill-infobox . | --------------------------------------------------------- */ | ||
/* Skills: lighten the hero-modules band + module backgrounds */ | |||
.mw-theme-light table.spiritvale-skill-infobox tr.hero-modules-row > td.hero-modules-cell { | |||
background: linear-gradient( | |||
135deg, | |||
rgba(255, 255, 255, 0.92), | |||
rgba(226, 232, 240, 0.92) | |||
) !important; | |||
} | } | ||
.mw-theme-light table.spiritvale-skill-infobox .hero-module { | |||
.mw-theme-light table.spiritvale-skill-infobox . | background: rgba(255, 255, 255, 0.65); | ||
} | } | ||
/* | /* Skills: improve text contrast inside modules */ | ||
.mw-theme-light table.spiritvale-skill-infobox .sv- | .mw-theme-light table.spiritvale-skill-infobox .module-level-selector .sv-level-title, | ||
.mw-theme-light table.spiritvale-skill-infobox .module-level-selector .sv-level-label, | |||
.mw-theme-light table.spiritvale-skill-infobox .module-skill-type .sv-type-value, | |||
.mw-theme-light table.spiritvale-skill-infobox .module-skill-type .sv-type-label { | |||
color: #111827; | |||
} | } | ||
.mw-theme-light table.spiritvale-skill-infobox .module-skill-type .sv-type-label { | |||
.mw-theme-light table.spiritvale-skill-infobox .sv-type-label { | |||
background: linear-gradient( | background: linear-gradient( | ||
180deg, | 180deg, | ||
| Line 566: | Line 434: | ||
} | } | ||
/* | /* Shared: stronger zebra striping + row separators in light mode */ | ||
.mw-theme-light table.spiritvale-skill-infobox > tbody > tr:nth-child(odd) > td, | .mw-theme-light table.spiritvale-skill-infobox > tbody > tr:nth-child(odd) > td, | ||
.mw-theme-light table.spiritvale-skill-infobox > tbody > tr:nth-child(odd) > th:not(.spiritvale-infobox-section-header), | .mw-theme-light table.spiritvale-skill-infobox > tbody > tr:nth-child(odd) > th:not(.spiritvale-infobox-section-header), | ||
| Line 581: | Line 442: | ||
} | } | ||
.mw-theme-light table.spiritvale-skill-infobox > tbody > tr, | .mw-theme-light table.spiritvale-skill-infobox > tbody > tr, | ||
.mw-theme-light table.spiritvale-passive-infobox > tbody > tr { | .mw-theme-light table.spiritvale-passive-infobox > tbody > tr { | ||
border-bottom: 1px solid rgba(55, 43, 84, 0.18); | border-bottom: 1px solid rgba(55, 43, 84, 0.18); | ||
} | |||
/* Optional OS-level fallback (only applies if your wiki doesn't set .mw-theme-light) */ | |||
@media (prefers-color-scheme: light) { | |||
table.spiritvale-skill-infobox tr.hero-modules-row > td.hero-modules-cell { | |||
background: linear-gradient( | |||
135deg, | |||
rgba(255, 255, 255, 0.92), | |||
rgba(226, 232, 240, 0.92) | |||
) !important; | |||
} | |||
table.spiritvale-skill-infobox .hero-module { | |||
background: rgba(255, 255, 255, 0.65); | |||
} | |||
table.spiritvale-skill-infobox > tbody > tr:nth-child(odd) > td, | |||
table.spiritvale-skill-infobox > tbody > tr:nth-child(odd) > th:not(.spiritvale-infobox-section-header), | |||
table.spiritvale-passive-infobox > tbody > tr:nth-child(odd) > td, | |||
table.spiritvale-passive-infobox > tbody > tr:nth-child(odd) > th:not(.spiritvale-infobox-section-header) { | |||
background-color: rgba(148, 163, 184, 0.12); | |||
} | |||
table.spiritvale-skill-infobox > tbody > tr, | |||
table.spiritvale-passive-infobox > tbody > tr { | |||
border-bottom: 1px solid rgba(55, 43, 84, 0.18); | |||
} | |||
} | } | ||