MediaWiki:Common.css
Jump to navigation
Jump to search
Note: After saving, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/***** Holdfast Wiki – Modern Base Theme ****************************************
Safe, incremental overrides for Vector/Vector-2022. Keep selectors scoped.
*******************************************************************************/
/* ==== Holdfast palette overrides (safe) ==== */
:root {
--hf-bg: #E1DCCE; /* parchment */
--hf-bg-subtle: #EEEDEB; /* cards/TOC */
--hf-fg: #1E1E1D; /* body text */
--hf-fg-muted: #63635B;
--hf-accent: #886D00; /* brass links */
--hf-accent-hover: #5A65EA; /* hover cobalt */
--hf-accent-visited: #545DD9;
--hf-border: #D9D7D1;
--hf-border-strong: #BFB69C;
}
/* Let the parchment show through the body container */
#content, .mw-body, .vector-body .mw-body { background: transparent !important; border: 0; box-shadow: none; }
/* ==== Safe top-left banner (Vector-2022 only) ==== */
.skin-vector-2022 .vector-header-container {
--hf-banner-h: 140px;
background-color: var(--hf-bg);
background-image:
url("/wiki/Special:FilePath/BannerImage.png"),
linear-gradient(to right, rgba(0,0,0,0) 0%, var(--hf-bg) 85%);
background-repeat: no-repeat, no-repeat;
background-position: left top, left top;
background-size: auto var(--hf-banner-h), 100% var(--hf-banner-h);
border-bottom: 2px solid var(--hf-border-strong);
min-height: var(--hf-banner-h);
}
/* ==== Optional: Sidebar & footer to match mock ==== */
#mw-panel {
background-color: #46463E !important;
color: #EEEDEB !important;
border-right: 1px solid #63635B;
}
#mw-panel a { color: #EEEDEB !important; }
#mw-panel a:hover { color: var(--hf-accent-hover) !important; }
#footer, .vector-footer {
background-color: #46463E;
color: #EEEDEB;
border-top: 2px solid var(--hf-border-strong);
}
/* ---- Safety valve for admins (keep commented out) ----
.skin-vector-2022 .vector-header-container {
/* background-image: none !important; min-height: 0 !important; */
}
*/
/* ===== 0) CSS Vars (easy theming) ===== */
:root {
--hf-font-sans: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
--hf-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--hf-fg: #16181d;
--hf-fg-muted: #5c6773;
--hf-bg: #ffffff;
--hf-bg-subtle: #f6f7f9;
--hf-accent: #2563eb; /* link blue */
--hf-accent-visited: #7c3aed;/* visited purple */
--hf-accent-hover: #1d4ed8;
--hf-border: #e5e7eb;
--hf-border-strong: #d1d5db;
--hf-h2-bg: #3c553c; /* your green header bar */
--hf-h2-fg: #ffffff;
--hf-code-bg: #0f172a; /* dark code panel */
--hf-code-fg: #e5e7eb;
--hf-table-header-bg: #f3f4f6;
--hf-table-row-alt: #fafafa;
--hf-warning: #a16207;
--hf-error: #b91c1c;
--hf-info: #1d4ed8;
--hf-success: #15803d;
}
/* ===== 1) Base Typography & Layout ===== */
body,
.vector-body {
color: var(--hf-fg);
background: var(--hf-bg);
font-family: var(--hf-font-sans);
line-height: 1.55;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
.mw-parser-output > p {
margin: 0.6em 0 0.9em;
font-size: 0.98rem;
}
/* Tighten content width a touch on large screens */
@media (min-width: 1200px) {
.vector-body .mw-content-container {
max-width: 980px;
}
}
/* ===== 2) Headings ===== */
.mw-parser-output h1,
.mw-parser-output h2,
.mw-parser-output h3,
.mw-parser-output h4 {
font-weight: 700;
letter-spacing: .2px;
}
/* Section bar style for H2 */
.mw-parser-output h2 {
background: var(--hf-h2-bg);
color: var(--hf-h2-fg);
border: 1px solid var(--hf-border-strong);
padding: 0.35em 0.6em;
margin-top: 1.6em;
margin-bottom: 0.4em;
font-variant: small-caps;
}
/* Sub-head underline for H3 */
.mw-parser-output h3 {
border-bottom: 1px solid var(--hf-border);
padding-bottom: .2em;
margin-top: 1.2em;
}
/* ===== 3) Links ===== */
.mw-parser-output a,
a.mw-selflink {
color: var(--hf-accent);
text-decoration: none;
}
.mw-parser-output a:hover {
color: var(--hf-accent-hover);
text-decoration: underline;
}
.mw-parser-output a:visited {
color: var(--hf-accent-visited);
}
/* ===== 4) TOC ===== */
.toc,
.mw-table-of-contents {
background: var(--hf-bg-subtle);
border: 1px solid var(--hf-border);
border-radius: 8px;
padding: 0.6em 0.8em;
}
.tocnumber { color: var(--hf-fg-muted); }
/* ===== 5) Collapsible [show]/[hide] – make it link-blue ===== */
.mw-collapsible-toggle,
.mw-collapsible-toggle .mw-collapsible-text {
color: var(--hf-accent);
cursor: pointer;
}
.mw-collapsible-toggle:hover .mw-collapsible-text {
text-decoration: underline;
}
/* If you’re using mw-collapsible mw-collapsed on sections */
.mw-collapsible .mw-collapsible-content {
padding-top: .4em;
}
/* ===== 6) Tables ===== */
.wikitable,
table.wikitable.sortable {
width: 100%;
border: 1px solid var(--hf-border);
border-collapse: separate;
border-spacing: 0;
border-radius: 10px;
overflow: hidden;
background: #fff;
font-size: 0.95rem;
}
.wikitable > tr > th,
.wikitable > * > tr > th {
background: var(--hf-table-header-bg);
font-weight: 700;
border-bottom: 1px solid var(--hf-border-strong);
padding: 0.55em 0.6em;
}
.wikitable > tr > td,
.wikitable > * > tr > td {
border-top: 1px solid var(--hf-border);
padding: 0.5em 0.6em;
}
.wikitable tr:nth-child(even) td {
background: var(--hf-table-row-alt);
}
/* Sort arrows breathing room */
.wikitable.sortable th {
white-space: nowrap;
}
/* ===== 7) Infobox / Navbox (generic) ===== */
.infobox,
.navbox,
.mw-infobox {
border: 1px solid var(--hf-border);
border-radius: 10px;
background: #fff;
padding: 0;
overflow: hidden;
}
.infobox .infobox-header,
.navbox .navbox-title {
background: var(--hf-table-header-bg);
font-weight: 700;
padding: 0.6em 0.75em;
border-bottom: 1px solid var(--hf-border);
}
.infobox td,
.infobox th {
padding: 0.5em 0.75em !important;
border-top: 1px solid var(--hf-border);
}
/* ===== 8) Notices / Admonitions ===== */
.hf-notice {
border-left: 4px solid var(--hf-info);
background: #eef4ff;
padding: 0.7em 0.9em;
margin: 1em 0;
border-radius: 6px;
}
.hf-notice.warn { border-left-color: var(--hf-warning); background: #fff7e6; }
.hf-notice.error{ border-left-color: var(--hf-error); background: #ffefef; }
.hf-notice.ok { border-left-color: var(--hf-success); background: #ecfdf3; }
/* Usage in wikitext:
<div class="hf-notice warn">Watch out…</div>
*/
/* ===== 9) Code Blocks – dark theme ===== */
pre, code, .mw-code,
pre .mw-code,
.syntaxhighlight, pre.mw-code {
font-family: var(--hf-font-mono);
}
pre,
pre.mw-code,
.syntaxhighlight {
background: var(--hf-code-bg) !important;
color: var(--hf-code-fg) !important;
border: 1px solid #0b1220 !important;
border-radius: 10px;
padding: 0.8em 1em !important;
overflow: auto;
}
/* Inline code */
code {
background: #0b1220;
color: var(--hf-code-fg);
padding: 0.05em 0.35em;
border-radius: 4px;
}
/* ===== 10) Buttons / Links-as-buttons ===== */
.hf-btn,
a.hf-btn {
display: inline-block;
background: var(--hf-accent);
color: #fff !important;
padding: 0.45em 0.75em;
border-radius: 8px;
border: 1px solid transparent;
text-decoration: none !important;
font-weight: 600;
}
.hf-btn:hover { background: var(--hf-accent-hover); }
.hf-btn.ghost {
background: transparent;
color: var(--hf-accent) !important;
border-color: var(--hf-accent);
}
/* ===== 11) Images / Thumbs ===== */
.thumb,
.mw-halign-left .thumb,
.mw-halign-right .thumb {
border: 1px solid var(--hf-border);
border-radius: 10px;
overflow: hidden;
background: #fff;
}
.thumb .thumbcaption {
background: var(--hf-bg-subtle);
border-top: 1px solid var(--hf-border);
padding: 0.4em 0.6em;
}
/* ===== 12) Cleanup odds & ends ===== */
/* Make “External links” icons less loud */
.mw-parser-output .external { padding-right: 0.1em; }
/* Reduce overly large firstHeading margins without hiding the title */
.mw-page-title-main {
margin-bottom: 0.2em;
}
/* Optional: soften category box */
.catlinks {
background: var(--hf-bg-subtle);
border: 1px solid var(--hf-border);
border-radius: 8px;
padding: .3em .6em;
}