MediaWiki:Common.css: Difference between revisions
MediaWiki interface page
More actions
No edit summary |
No edit summary |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 90: | Line 90: | ||
font-size: 0.95em; | font-size: 0.95em; | ||
} | } | ||
/* Top "hero" row: icon+name on left, description on right */ | /* Top "hero" row: icon+name on left, description on right */ | ||
| Line 133: | Line 121: | ||
} | } | ||
/* Default label cells */ | /* Default label cells (exclude hero row so names never clip) */ | ||
table.spiritvale-skill-infobox tbody tr 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 th:not(.spiritvale-infobox-section-header) { | table.spiritvale-passive-infobox tbody tr:not(.spiritvale-infobox-main) th:not(.spiritvale-infobox-section-header) { | ||
width: 26%; | width: 26%; | ||
padding: 0.45em 0.85em; | padding: 0.45em 0.85em; | ||
| Line 202: | Line 190: | ||
- Fixed, consistent desktop width | - Fixed, consistent desktop width | ||
- Centered body cells | - Centered body cells | ||
- Mobile- | - Mobile hero stays side-by-side (no stacking) | ||
========================================================== */ | ========================================================== */ | ||
/* Desktop tooltip width knob */ | |||
:root { --sv-passive-width: 540px; } | |||
} | |||
/* | /* Consistent tooltip footprint for ALL passives (desktop) */ | ||
table.spiritvale-passive-infobox { | table.spiritvale-passive-infobox { | ||
width: var(--sv-passive-width); | width: var(--sv-passive-width); | ||
max-width: | max-width: var(--sv-passive-width); /* <-- important: makes desktop actually widen */ | ||
margin: 1em auto; | margin: 1em auto; | ||
table-layout: fixed; | |||
} | |||
/* Keep hero row healthy: allow wrapping in the hero title area */ | |||
table.spiritvale-passive-infobox > tbody > tr.spiritvale-infobox-main > th { | |||
table- | width: 42%; | ||
white-space: normal; | |||
} | |||
table.spiritvale-passive-infobox > tbody > tr.spiritvale-infobox-main > td { | |||
width: 58%; | |||
} | } | ||
/* Center + wrap | /* Center + wrap ALL non-hero rows */ | ||
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 { | ||
text-align: center; | text-align: center; | ||
vertical-align: middle; | vertical-align: middle; | ||
white-space: normal; | white-space: normal; | ||
overflow-wrap: anywhere; | overflow-wrap: anywhere; | ||
| Line 232: | Line 223: | ||
} | } | ||
/* Allow | /* Allow label column to wrap (generic CSS defaults it to 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 243: | Line 234: | ||
} | } | ||
/* Prevent description width | /* Prevent description max-width from pushing weird layout at small widths */ | ||
table.spiritvale-passive-infobox .spiritvale-infobox-description { | table.spiritvale-passive-infobox .spiritvale-infobox-description { | ||
max-width: 100%; | max-width: 100%; | ||
| Line 250: | Line 241: | ||
} | } | ||
/* | /* Passive list layout */ | ||
.spiritvale-passive-list { | .spiritvale-passive-list { | ||
display: flex; | display: flex; | ||
| Line 258: | Line 249: | ||
} | } | ||
/* | /* Citizen/table wrappers: remove the “mystery 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 270: | Line 261: | ||
} | } | ||
/* Mobile: | /* Mobile / portrait / small tablets (Citizen): keep hero row side-by-side */ | ||
@media (max-width: | @media (max-width: 768px) { | ||
table.spiritvale-passive-infobox { | body.skin-citizen table.spiritvale-passive-infobox { | ||
width: 100%; | width: 100%; | ||
max-width: 100%; | max-width: 100%; | ||
display: table !important; | |||
} | |||
body.skin-citizen table.spiritvale-passive-infobox > tbody { | |||
display: table-row-group !important; | |||
} | |||
body.skin-citizen table.spiritvale-passive-infobox > tbody > tr.spiritvale-infobox-main { | |||
display: table-row !important; | |||
} | } | ||
body.skin-citizen table.spiritvale-passive-infobox > tbody > tr.spiritvale-infobox-main > th, | |||
body.skin-citizen table.spiritvale-passive-infobox > tbody > tr.spiritvale-infobox-main > td { | |||
table.spiritvale-passive-infobox > tbody > tr.spiritvale-infobox-main > td { | display: table-cell !important; | ||
display: | float: none !important; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
vertical-align: middle; | |||
text-align: center; | text-align: center; | ||
white-space: normal; | |||
overflow-wrap: anywhere; | |||
word-break: break-word; | |||
} | |||
body.skin-citizen table.spiritvale-passive-infobox > tbody > tr.spiritvale-infobox-main > th { | |||
width: 46% !important; | |||
padding: 0.75em 0.75em; | |||
} | |||
body.skin-citizen table.spiritvale-passive-infobox > tbody > tr.spiritvale-infobox-main > td { | |||
width: 54% !important; | |||
padding: 0.75em 0.75em; | |||
} | } | ||
body.skin-citizen table.spiritvale-passive-infobox > tbody > tr.spiritvale-infobox-main > th .image img { | |||
width: 64px !important; | width: 64px !important; | ||
height: auto !important; | height: auto !important; | ||
} | } | ||
body.skin-citizen table.spiritvale-passive-infobox .spiritvale-infobox-title, | |||
table.spiritvale-passive-infobox .spiritvale-infobox- | body.skin-citizen table.spiritvale-passive-infobox .spiritvale-infobox-description { | ||
white-space: normal; | white-space: normal; | ||
overflow-wrap: anywhere; | overflow-wrap: anywhere; | ||