MediaWiki:Common.css: Difference between revisions
CaptainChris (talk | contribs) No edit summary |
CaptainChris (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
/* | /* ============================== | ||
GLOBAL LAYOUT / PAGE STYLES | |||
============================== */ | |||
/* Base page container */ | |||
.mp-container { | .mp-container { | ||
display: flex; | display: flex; | ||
| Line 14: | Line 18: | ||
/* Right sidebar */ | /* Right sidebar */ | ||
.mp-right { | .mp-right { | ||
flex: 0 0 320px; | flex: 0 0 320px; | ||
max-width: 100%; | max-width: 100%; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
| Line 41: | Line 45: | ||
} | } | ||
} | } | ||
/* ============================== | |||
CONTRIBUTION CTA BUTTON | |||
============================== */ | |||
.wp-contrib-cta { | .wp-contrib-cta { | ||
| Line 48: | Line 56: | ||
} | } | ||
.wp-contrib-cta__btn { | |||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
justify-content: center; | justify-content: center; | ||
gap: 0.75rem; | gap: 0.75rem; | ||
width: min(100%, 28rem); | width: min(100%, 28rem); | ||
padding: 0.9rem 1.2rem; | padding: 0.9rem 1.2rem; | ||
background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%); | background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%); | ||
color: #fff; | color: #fff; | ||
| Line 64: | Line 71: | ||
box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35), | box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35), | ||
0 2px 6px rgba(0, 0, 0, 0.15); | 0 2px 6px rgba(0, 0, 0, 0.15); | ||
border: 1px solid rgba(255,255,255,0.18); | border: 1px solid rgba(255, 255, 255, 0.18); | ||
transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease; | transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease; | ||
} | } | ||
| Line 82: | Line 89: | ||
.wp-contrib-cta__btn:focus-visible { | .wp-contrib-cta__btn:focus-visible { | ||
outline: 3px solid #a5b4fc; | outline: 3px solid #a5b4fc; | ||
outline-offset: 3px; | outline-offset: 3px; | ||
} | } | ||
| Line 88: | Line 95: | ||
.wp-contrib-cta__icon, | .wp-contrib-cta__icon, | ||
.wp-contrib-cta__arrow { | .wp-contrib-cta__arrow { | ||
width: 1.5em; | width: 1.5em; | ||
height: 1.5em; | height: 1.5em; | ||
| Line 114: | Line 119: | ||
@media (prefers-color-scheme: dark) { | @media (prefers-color-scheme: dark) { | ||
.wp-contrib-cta__btn { | .wp-contrib-cta__btn { | ||
border-color: rgba(255,255,255,0.22); | border-color: rgba(255, 255, 255, 0.22); | ||
} | } | ||
} | } | ||
/* ============================== | |||
MAIN PAGE HEADING HIDES | |||
============================== */ | |||
body.page-Main_Page #firstHeading, | body.page-Main_Page #firstHeading, | ||
body.page-Main_Page .firstHeading, | body.page-Main_Page .firstHeading, | ||
body.page-Main_Page h1.firstHeading { | body.page-Main_Page h1.firstHeading { | ||
display: none !important; | |||
} | } | ||
| Line 127: | Line 136: | ||
body.page-Main_Page .mw-body h1, | body.page-Main_Page .mw-body h1, | ||
body.page-Main_Page #contentSub { | body.page-Main_Page #contentSub { | ||
display: none !important; | |||
margin: 0 !important; | |||
padding: 0 !important; | |||
border: none !important; | |||
} | } | ||
/* | /* ============================== | ||
INFOBOX REDESIGN (v2) | |||
============================== */ | |||
/* container */ | |||
.infobox { | .infobox { | ||
position: relative; | |||
float: right; | |||
width: 300px; | |||
margin: -2em 0 1em 1em; | |||
font-size: 90%; | |||
background: #fff; | |||
border: 1px solid #b8d4f1; | |||
border-radius: 6px; | |||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); | |||
overflow: hidden; | |||
clear: none !important; | |||
border-collapse: collapse !important; | |||
} | } | ||
@media | @media (max-width: 511px) { | ||
.infobox { | |||
float: none; | |||
margin: 0 0 1em 0; | |||
width: auto; | |||
} | |||
} | } | ||
@media | @media (max-width: 337px) { | ||
.infobox { | |||
margin-left: -16px; | |||
margin-right: -16px; | |||
border-left: none; | |||
border-right: none; | |||
} | |||
} | } | ||
/* | /* title */ | ||
.infobox-title { | .infobox-title { | ||
text-align: center; | |||
font-weight: bold; | |||
font-size: 120%; | |||
background: #3b82f6; | |||
color: #fff; | |||
padding: 8px; | |||
border-radius: 4px 4px 0 0; | |||
} | } | ||
/* image */ | |||
/* | |||
.infobox-imagearea { | .infobox-imagearea { | ||
text-align: center; | |||
padding: 6px; | |||
background: #fafcff; | |||
border-bottom: 1px solid #d5e4f6; | |||
} | } | ||
.infobox-imagearea | .infobox-imagearea img { | ||
max-width: 100%; | |||
height: auto; | |||
border-radius: 3px; | |||
} | } | ||
/* | /* rows */ | ||
. | .infobox .infobox-rows { | ||
display: table; | |||
width: 100%; | |||
border-collapse: collapse !important; | |||
} | } | ||
.infobox-rows tr { | |||
.infobox- | border-bottom: 1px solid #e6effb; | ||
} | } | ||
.infobox- | .infobox-rows tr:last-child { | ||
border-bottom: none; | |||
} | } | ||
.infobox-rows tr:nth-child(2n) { | .infobox-rows tr:nth-child(2n) { | ||
background-color: #f4f8ff; | |||
} | } | ||
.infobox-rows | /* labels (left column) */ | ||
.infobox-rows th { | |||
text-align: left; | |||
white-space: nowrap; | |||
color: #0d47a1; | |||
background-color: #f1f6ff; | |||
padding: 4px 6px; | |||
width: 35%; | |||
font-weight: 600; | |||
border-right: 1px solid #d8e5fb; | |||
vertical-align: middle; | |||
} | } | ||
. | /* values (right column) */ | ||
.infobox-rows td { | |||
padding: 4px 6px; | |||
line-height: 1.1em; | |||
vertical-align: middle; | |||
color: #222; | |||
background: #fff; | |||
} | } | ||
/* | /* eliminate extra whitespace */ | ||
.infobox | .infobox td > div, | ||
.infobox td > p { | |||
margin: 0 !important; | |||
padding: 0 !important; | |||
display: inline !important; | |||
} | } | ||
.infobox-rows | /* optional alternating hover for clarity */ | ||
.infobox-rows tr:hover { | |||
background-color: #e8f1ff; | |||
} | } | ||
/* | /* footer / bottom text */ | ||
.infobox-footer { | .infobox-footer { | ||
text-align: center; | |||
color: #0d47a1; | |||
background: #e8f2ff; | |||
border-top: 1px solid #b8d4f1; | |||
padding: 5px; | |||
font-style: italic; | |||
font-size: 90%; | |||
} | } | ||
/* | /* remove stray p spacing and cleanup */ | ||
.mw-parser-output > .infobox + p:empty, | .mw-parser-output > .infobox + p:empty, | ||
.mw-parser-output > .infobox + p:has(> br:only-child) { | .mw-parser-output > .infobox + p:has(> br:only-child) { | ||
display: none !important; | |||
} | } | ||
.mw-parser-output > .infobox + p { | .mw-parser-output > .infobox + p { | ||
margin-top: 0 !important; | |||
} | } | ||
/* | /* debug hiding */ | ||
. | .history-json { | ||
display: none; | |||
display: | |||
} | } | ||