MediaWiki:Common.css: Difference between revisions
MediaWiki interface page
More actions
No edit summary |
No edit summary |
||
| Line 199: | Line 199: | ||
/* ============================================================ | /* ============================================================ | ||
SpiritVale: Passives ( | SpiritVale: Passives (single source of truth) | ||
- Fixed, consistent desktop width | |||
- Centered body cells | |||
- Mobile-safe hero row (stacks) | |||
========================================================== */ | ========================================================== */ | ||
:root { | :root { | ||
--sv-passive | /* One knob: desktop tooltip width for ALL passives */ | ||
--sv-passive-width: 360px; | |||
} | } | ||
/* | /* Fixed tooltip footprint on desktop, still safe if container is narrower */ | ||
table.spiritvale-passive-infobox { | table.spiritvale-passive-infobox { | ||
width: | width: var(--sv-passive-width); | ||
max-width: | max-width: 100%; | ||
margin: 1em auto; | margin: 1em auto; | ||
/* | /* Reset any earlier experiments */ | ||
display: | display: table; | ||
table-layout: fixed; | |||
} | } | ||
/* Center + wrap | /* Center + wrap all NON-hero rows (hero row stays as your “perfect” styling) */ | ||
table.spiritvale-passive-infobox tbody tr:not(.spiritvale-infobox-main) th, | table.spiritvale-passive-infobox tbody tr:not(.spiritvale-infobox-main) th, | ||
table.spiritvale-passive-infobox tbody tr:not(.spiritvale-infobox-main) td { | table.spiritvale-passive-infobox tbody tr:not(.spiritvale-infobox-main) td { | ||
| Line 224: | Line 227: | ||
vertical-align: middle; | vertical-align: middle; | ||
white-space: normal; | white-space: normal; | ||
overflow-wrap: anywhere; | overflow-wrap: anywhere; | ||
word-break: break-word; | word-break: break-word; | ||
} | } | ||
/* | /* Allow labels to wrap too (generic CSS makes labels nowrap) */ | ||
table.spiritvale-passive-infobox tbody tr:not(.spiritvale-infobox-main) | table.spiritvale-passive-infobox tbody tr:not(.spiritvale-infobox-main) | ||
th:not(.spiritvale-infobox-section-header) { | th:not(.spiritvale-infobox-section-header) { | ||
| Line 240: | Line 243: | ||
} | } | ||
/* | /* Prevent description width rules from pushing layout weirdly */ | ||
table.spiritvale-passive-infobox .spiritvale-infobox-description { | table.spiritvale-passive-infobox .spiritvale-infobox-description { | ||
max-width: 100%; | |||
overflow-wrap: anywhere; | overflow-wrap: anywhere; | ||
word-break: break-word; | word-break: break-word; | ||
| Line 254: | Line 258: | ||
} | } | ||
/* | /* Remove “mystery wrapper outline” around some passives in lists */ | ||
.spiritvale-passive-list .mw-table-wrapper, | .spiritvale-passive-list .mw-table-wrapper, | ||
.spiritvale-passive-list .table-overflow, | .spiritvale-passive-list .table-overflow, | ||
| Line 295: | Line 270: | ||
} | } | ||
/* Mobile: go full width AND stack the hero row so nothing goes off-screen */ | |||
/* Mobile: | |||
@media (max-width: 480px) { | @media (max-width: 480px) { | ||
table.spiritvale-passive-infobox { | table.spiritvale-passive-infobox { | ||
| Line 312: | Line 276: | ||
max-width: 100%; | max-width: 100%; | ||
} | } | ||
/* | /* Stack icon+name over description */ | ||
table.spiritvale-passive-infobox > tbody > tr.spiritvale-infobox-main > th, | |||
table.spiritvale-passive-infobox > tbody > tr.spiritvale-infobox-main > td { | |||
display: block; | |||
width: 100%; | |||
box-sizing: border-box; | |||
text-align: center; | |||
} | |||
/* Slightly smaller icon on phones */ | |||
table.spiritvale-passive-infobox > tbody > tr.spiritvale-infobox-main > th .image img { | |||
width: 64px !important; | |||
height: auto !important; | |||
} | |||
/* Ensure title wraps cleanly */ | |||
table.spiritvale-passive-infobox .spiritvale-infobox-title { | |||
white-space: normal; | |||
overflow-wrap: anywhere; | |||
word-break: break-word; | |||
} | |||
} | } | ||