MediaWiki:Common.css: Difference between revisions
Jump to navigation
Jump to search
Add clickable light/dark theme toggle |
Light theme: adopt Guild Wars 2 Wiki color scheme |
||
| Line 1: | Line 1: | ||
:root { | :root { | ||
--bg: # | --bg: #cabd9c; | ||
--bg-2: # | --bg-2: #d3c0a8; | ||
--content-bg: # | --content-bg: #fff8e8; | ||
--panel: # | --panel: #f2ece5; | ||
--panel-2: # | --panel-2: #e6ccb3; | ||
--border: # | --border: #a99a86; | ||
--border-2: # | --border-2: #cca38f; | ||
--text: # | --text: #1a1a1a; | ||
--text-dim: # | --text-dim: #5a5246; | ||
--heading: # | --heading: #252017; | ||
--link: # | --link: #0645ad; | ||
--link-hover: # | --link-hover: #3366cc; | ||
--link-visited: # | --link-visited: #5a3696; | ||
--link-red: # | --link-red: #ba0000; | ||
--accent: # | --accent: #ba966a; | ||
} | } | ||
Revision as of 16:11, 28 June 2026
:root {
--bg: #cabd9c;
--bg-2: #d3c0a8;
--content-bg: #fff8e8;
--panel: #f2ece5;
--panel-2: #e6ccb3;
--border: #a99a86;
--border-2: #cca38f;
--text: #1a1a1a;
--text-dim: #5a5246;
--heading: #252017;
--link: #0645ad;
--link-hover: #3366cc;
--link-visited: #5a3696;
--link-red: #ba0000;
--accent: #ba966a;
}
@media (prefers-color-scheme: dark) {
:root:not(.theme-light) {
--bg: #1b1c1e;
--bg-2: #232529;
--content-bg: #27292d;
--panel: #2d3036;
--panel-2: #33373e;
--border: #3d4350;
--border-2: #33373e;
--text: #e4e6e8;
--text-dim: #a6abb3;
--heading: #f2f2f2;
--link: #79a6ff;
--link-hover: #9cc0ff;
--link-visited: #b594e6;
--link-red: #ff7b75;
--accent: #c9a861;
}
}
html.theme-dark {
--bg: #1b1c1e;
--bg-2: #232529;
--content-bg: #27292d;
--panel: #2d3036;
--panel-2: #33373e;
--border: #3d4350;
--border-2: #33373e;
--text: #e4e6e8;
--text-dim: #a6abb3;
--heading: #f2f2f2;
--link: #79a6ff;
--link-hover: #9cc0ff;
--link-visited: #b594e6;
--link-red: #ff7b75;
--accent: #c9a861;
}
html, body { background: var(--bg); }
body {
color: var(--text);
font-family: 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
}
#mw-page-base { background: var(--bg); }
#mw-head-base { background: transparent; border: 0; }
.mw-body, #content {
background: var(--content-bg);
color: var(--text);
border: 1px solid var(--border);
border-right-width: 0;
}
.mw-body-content { font-size: 0.95rem; line-height: 1.6; }
.mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4,
.mw-body .firstHeading, #firstHeading {
font-family: 'PT Serif', Georgia, 'Times New Roman', serif;
color: var(--heading);
font-weight: 700;
}
.mw-body h1, .mw-body h2, #firstHeading {
border-bottom: 1px solid var(--border);
padding-bottom: 0.18em;
}
.mw-body a, .mw-body a:link { color: var(--link); }
.mw-body a:visited { color: var(--link-visited); }
.mw-body a:hover { color: var(--link-hover); }
.mw-body a.new, .mw-body a.new:visited { color: var(--link-red); }
#mw-head { background: var(--bg-2); border-bottom: 1px solid var(--border); }
#mw-head .vector-menu-tabs,
#mw-head .vector-menu-tabs li,
#mw-head .vector-menu-tabs li a,
#mw-head .vector-menu-tabs .selected a { background-image: none; }
#mw-head .vector-menu-tabs li {
background-color: var(--bg-2);
border: 1px solid var(--border);
border-bottom: 0;
}
#mw-head .vector-menu-tabs li.selected { background-color: var(--content-bg); }
#mw-head .vector-menu-tabs li a,
#mw-head .vector-menu-tabs li a:visited { color: var(--link); }
#mw-head .vector-menu-tabs li.selected a { color: var(--text); }
#p-personal a, #p-personal a:visited { color: var(--link); }
#mw-panel { background: transparent; }
#mw-panel .vector-menu-heading,
#mw-panel .portal h3 {
color: var(--text-dim);
font-family: 'Noto Sans', sans-serif;
font-weight: 700;
font-size: 0.75em;
text-transform: none;
}
#mw-panel a, #mw-panel a:visited { color: var(--link); }
#mw-panel a:hover { color: var(--link-hover); }
#p-search input, #searchInput, #mw-searchButton, #searchButton {
background: var(--content-bg);
color: var(--text);
border: 1px solid var(--border);
}
#footer {
background: var(--bg-2);
border-top: 1px solid var(--border);
color: var(--text-dim);
}
#footer a, #footer a:visited { color: var(--link); }
#footer li { color: var(--text-dim); }
.mw-body .wikitable {
background: var(--content-bg);
color: var(--text);
border: 1px solid var(--border);
border-collapse: collapse;
}
.mw-body .wikitable > * > tr > th {
background: var(--panel-2);
color: var(--heading);
border: 1px solid var(--border);
}
.mw-body .wikitable > * > tr > td { border: 1px solid var(--border); }
.mw-body .wikitable > * > tr:nth-child(even) > td { background: var(--panel); }
.infobox {
float: right;
clear: right;
width: 270px;
margin: 0 0 1em 1.4em;
background: var(--content-bg);
border: 1px solid var(--border);
font-size: 0.86rem;
}
.infobox .infobox-title {
background: var(--panel-2);
color: var(--heading);
font-family: 'PT Serif', Georgia, serif;
font-size: 1.1rem;
font-weight: 700;
text-align: center;
padding: 0.45em 0.6em;
border-bottom: 2px solid var(--accent);
}
.infobox .infobox-image { text-align: center; padding: 0.7em 0.5em 0.3em; }
.infobox .infobox-image img { max-width: 100%; height: auto; }
.infobox .infobox-caption {
text-align: center;
color: var(--text-dim);
font-style: italic;
padding: 0 0.6em 0.5em;
font-size: 0.8rem;
}
.infobox table { width: 100%; border-collapse: collapse; }
.infobox .infobox-header {
background: var(--panel);
color: var(--heading);
font-family: 'PT Serif', Georgia, serif;
text-align: center;
padding: 0.35em 0.6em;
border-top: 1px solid var(--border);
}
.infobox th.infobox-label {
text-align: left;
color: var(--text-dim);
font-weight: 600;
width: 42%;
padding: 0.3em 0.6em;
vertical-align: top;
border-top: 1px solid var(--border-2);
}
.infobox td.infobox-data {
padding: 0.3em 0.6em;
vertical-align: top;
border-top: 1px solid var(--border-2);
}
.navbox {
clear: both;
width: 100%;
margin: 1.2em 0 0;
background: var(--content-bg);
border: 1px solid var(--border);
font-size: 0.85rem;
border-collapse: collapse;
}
.navbox .navbox-title {
background: var(--panel-2);
color: var(--heading);
font-family: 'PT Serif', Georgia, serif;
font-size: 1.05rem;
font-weight: 700;
text-align: center;
padding: 0.4em 0.6em;
border-bottom: 2px solid var(--accent);
}
.navbox .navbox-group {
background: var(--panel);
color: var(--heading);
font-family: 'PT Serif', Georgia, serif;
text-align: right;
white-space: nowrap;
padding: 0.4em 0.7em;
width: 1%;
vertical-align: middle;
border: 1px solid var(--border);
}
.navbox .navbox-list {
padding: 0.4em 0.7em;
border: 1px solid var(--border-2);
}
.navbox .navbox-list a { margin-right: 0.2em; }
.messagebox {
border: 1px solid var(--border);
border-left: 4px solid var(--accent);
background: var(--panel);
padding: 0.7em 1em;
margin: 0.8em 0;
}
.mb-hero {
text-align: center;
background: var(--panel);
border: 1px solid var(--border);
padding: 1.3em 1em;
margin-bottom: 1.2em;
}
.mb-hero .mb-hero-title {
font-family: 'PT Serif', Georgia, serif;
font-size: 2.1rem;
font-weight: 700;
color: var(--heading);
}
.mb-hero .mb-hero-tagline { color: var(--text-dim); font-size: 1.05rem; }
.mb-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1em;
}
@media (max-width: 720px) { .mb-grid { grid-template-columns: 1fr; } }
.mb-card {
background: var(--content-bg);
border: 1px solid var(--border);
border-top: 3px solid var(--accent);
padding: 0.4em 1em 1em;
}
.mb-card > h2 {
font-family: 'PT Serif', Georgia, serif;
color: var(--heading);
border-bottom: 1px solid var(--border);
margin-top: 0.5em;
}
.mistbound-hero {
border: 1px solid var(--border);
background: var(--panel);
padding: 1em;
}