Difference between revisions of "MediaWiki:Vector.css"
Jump to navigation
Jump to search
| Line 86: | Line 86: | ||
/* ========================= | /* ========================= | ||
| − | 2) SIDEBAR | + | 2) SIDEBAR – OSRS-style card |
========================= */ | ========================= */ | ||
| + | |||
| + | /* Make the left rail a narrow dark gutter; the panel itself becomes a card */ | ||
| + | body::before{ | ||
| + | content:""; | ||
| + | position: fixed; | ||
| + | inset: 0 0 0 auto; | ||
| + | width: calc(var(--hf-sidebar-w) + 16px); /* gutter width */ | ||
| + | left: 0; | ||
| + | background: #151515; /* dark outer rail */ | ||
| + | z-index: 0; | ||
| + | } | ||
| + | |||
| + | /* Sidebar as a *card* instead of full-height slab */ | ||
#mw-panel{ | #mw-panel{ | ||
position: fixed; | position: fixed; | ||
| − | top: | + | top: .6rem; /* give it breathing room */ |
| + | left: .6rem; | ||
| + | bottom: auto; /* no stretch to bottom */ | ||
width: var(--hf-sidebar-w); | width: var(--hf-sidebar-w); | ||
background: var(--hf-side-bg); | background: var(--hf-side-bg); | ||
color: var(--hf-side-fg); | color: var(--hf-side-fg); | ||
| − | border | + | border: 1px solid rgba(0,0,0,.25); |
| − | + | border-radius: 14px; | |
| − | + | box-shadow: 0 10px 25px rgba(0,0,0,.28), 0 2px 6px rgba(0,0,0,.18); | |
| + | overflow: hidden; /* round the logo header too */ | ||
| + | padding-top: 0; /* header handles its own spacing */ | ||
| + | z-index: 3; | ||
| + | max-height: calc(100vh - 1.2rem); /* fits viewport, scrollable */ | ||
| + | display: flex; | ||
| + | flex-direction: column; | ||
} | } | ||
| − | /* | + | /* Logo/hero header block */ |
#p-logo{ | #p-logo{ | ||
| − | background: var(--hf-side-bg); | + | position: relative; |
| − | padding: . | + | height: 112px; /* tune for your art */ |
| + | background: | ||
| + | linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,0)) , | ||
| + | var(--hf-side-bg); /* fallback if no image */ | ||
| + | padding: 0; | ||
| + | border-bottom: 1px solid rgba(0,0,0,.25); | ||
} | } | ||
#p-logo a{ | #p-logo a{ | ||
| − | + | height: 100%; | |
| − | height: | ||
| − | |||
| − | |||
| − | |||
text-indent: -9999px; | text-indent: -9999px; | ||
overflow: hidden; | overflow: hidden; | ||
| + | background-repeat: no-repeat; | ||
| + | background-position: center 55%; | ||
| + | background-size: contain; /* your logo image */ | ||
| + | display: block; | ||
| + | } | ||
| + | |||
| + | /* Body of the sidebar scrolls independently */ | ||
| + | #mw-panel .portal{ | ||
| + | padding: .65rem .8rem; | ||
| + | } | ||
| + | #mw-panel .portal + .portal{ | ||
| + | padding-top: .2rem; | ||
| + | border-top: 1px solid rgba(0,0,0,.12); | ||
| + | } | ||
| + | |||
| + | /* Headings – compact, weighty, OSRS-ish */ | ||
| + | #mw-panel .portal .portal-heading{ | ||
| + | font-weight: 800; | ||
| + | font-size: .92rem; | ||
| + | color: #111; | ||
| + | margin: .35rem .2rem .25rem; | ||
| + | letter-spacing: .2px; | ||
} | } | ||
| − | /* | + | /* Link list */ |
| + | #mw-panel .portal .body{ | ||
| + | margin: 0; | ||
| + | padding: 0; | ||
| + | } | ||
| + | #mw-panel .portal .body ul{ | ||
| + | list-style: none; | ||
| + | margin: 0; | ||
| + | padding: 0; | ||
| + | } | ||
| + | #mw-panel .portal .body li{ | ||
| + | margin: .12rem 0; | ||
| + | } | ||
#mw-panel .portal .body li a{ | #mw-panel .portal .body li a{ | ||
| − | |||
display: block; | display: block; | ||
| − | + | color: #242424; | |
| − | |||
text-decoration: none; | text-decoration: none; | ||
| + | padding: .28rem .45rem; | ||
| + | border-radius: 8px; | ||
| + | line-height: 1.35; | ||
} | } | ||
#mw-panel .portal .body li a:hover{ | #mw-panel .portal .body li a:hover{ | ||
| − | background: rgba(0,0,0,.08); | + | background: rgba(255,255,255,.5); |
| − | + | color: #000; | |
| + | text-decoration: none; | ||
| + | box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); | ||
| + | } | ||
| + | |||
| + | /* Subtle “Show more…” / utility link style */ | ||
| + | #mw-panel .portal .body li a[href*="more"], | ||
| + | #mw-panel .portal .body li a[href*="Show more"]{ | ||
| + | opacity: .85; | ||
| + | font-style: italic; | ||
| + | } | ||
| + | |||
| + | /* Make timestamps or small text look muted if present */ | ||
| + | #mw-panel .portal .body li small, | ||
| + | #mw-panel .portal .body .mw-changeslist-date{ | ||
| + | opacity: .7; | ||
| + | font-size: .86em; | ||
} | } | ||
| − | + | ||
| − | color: # | + | /* Discord pill button you can use for a top link */ |
| + | a.hf-discord-btn{ | ||
| + | display: inline-flex; | ||
| + | align-items: center; | ||
| + | gap: .4rem; | ||
| + | background: #5865F2; | ||
| + | color: #fff !important; | ||
| + | border-radius: 10px; | ||
| + | padding: .45rem .6rem; | ||
font-weight: 700; | font-weight: 700; | ||
| − | margin: . | + | margin: .55rem .8rem 0; |
| + | box-shadow: 0 4px 10px rgba(88,101,242,.35); | ||
| + | } | ||
| + | a.hf-discord-btn:hover{ | ||
| + | filter: brightness(1.08); | ||
| + | box-shadow: 0 6px 14px rgba(88,101,242,.45); | ||
| + | text-decoration: none; | ||
} | } | ||
| − | /* | + | /* Keep main content offset aligned with the new fixed card */ |
| − | . | + | #content, |
| + | .mw-body, | ||
| + | #mw-content, | ||
#mw-head-base, | #mw-head-base, | ||
| − | #mw-head{ | + | #mw-head, |
| − | margin-left: var(--hf-sidebar-w); | + | .vector-sticky-header{ |
| + | margin-left: calc(var(--hf-sidebar-w) + 1.2rem); | ||
} | } | ||
| + | |||
| + | /* Responsive: tighten gutter on smaller widths */ | ||
| + | @media (max-width: 1200px){ | ||
| + | :root { --hf-sidebar-w: 11.5em; } | ||
| + | #mw-panel{ left: .5rem; } | ||
| + | #content, .mw-body, #mw-content, | ||
| + | #mw-head-base, #mw-head, .vector-sticky-header{ | ||
| + | margin-left: calc(var(--hf-sidebar-w) + 1rem); | ||
| + | } | ||
| + | } | ||
| + | @media (max-width: 980px){ | ||
| + | :root { --hf-sidebar-w: 10.5em; } | ||
| + | #content, .mw-body, #mw-content, | ||
| + | #mw-head-base, #mw-head, .vector-sticky-header{ | ||
| + | margin-left: calc(var(--hf-sidebar-w) + .9rem); | ||
| + | } | ||
| + | } | ||
| + | |||
/* ========================= | /* ========================= | ||
Revision as of 14:17, 25 September 2025
/************************************************************
* Holdfast Wiki – Vector skin overrides (Neutral / Tan)
* Single source of truth for colors, spacing, and layout.
* Updated: modern card look, refined sidebar, cleaner headings,
* better spacing, Vector 2022 compat, a11y, and responsive fixes.
************************************************************/
/* =========================
0) THEME VARIABLES
========================= */
:root{
/* Layout */
--hf-sidebar-w: 13em; /* sidebar width (see responsive tweaks) */
--hf-logo-h: 236px; /* Vector logo background height */
--hf-content-max: 1120px;
/* Page & cards */
--hf-page-bg: #e7ddc5; /* parchment (slightly darker for contrast) */
--hf-card-bg: #fffdf9; /* content card */
--hf-card-border: #d6ceb9;
--hf-shadow: 0 1px 2px rgba(0,0,0,.06);
/* Sidebar (tan) */
--hf-side-bg: #bfa57b; /* sidebar + section bars */
--hf-side-fg: #2b2b2b;
--hf-side-link: #111; /* darker for readability */
--hf-side-link-hover: #000;
--hf-tan-border: #a88f66; /* border that matches tan */
/* Top bar */
--hf-topbar-bg: #c7b189;
--hf-topbar-border: #ac9872;
/* Text & links */
--hf-fg: #141414;
--hf-link: #1843c6;
--hf-link-hover: #1236a2;
--hf-link-visited: #5a1a92;
/* Headings */
--hf-h2-fg: #111;
--hf-h2-underline: #cdbf9f;
/* Selection */
--hf-selection-bg: #2f55d4;
--hf-selection-fg: #fff;
}
/* =========================
1) GLOBAL LAYOUT & TYPOGRAPHY
========================= */
body{
background: var(--hf-page-bg);
color: var(--hf-fg);
font-family: 'IBM Plex Sans', 'Helvetica Neue', 'Arial', sans-serif;
font-size: 16px;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
/* Main content container width (Vector 2022 & Legacy) */
.vector-body .mw-content-container,
.vector-body .mw-content-ltr .mw-parser-output{
max-width: var(--hf-content-max);
margin-inline: auto;
padding-inline: 1rem;
}
/* Make paragraphs breathe a bit */
.mw-parser-output > p{ margin: .5em 0 .9em; }
/* Page content card (legacy #content + new selectors) */
#content,
.mw-body,
#mw-content{
background: var(--hf-card-bg);
border: 1px solid var(--hf-card-border);
border-radius: 10px;
padding: 1.2rem 1.4rem;
margin-left: var(--hf-sidebar-w); /* clear the fixed sidebar */
box-shadow: var(--hf-shadow);
position: relative;
z-index: 2;
}
/* =========================
2) SIDEBAR – OSRS-style card
========================= */
/* Make the left rail a narrow dark gutter; the panel itself becomes a card */
body::before{
content:"";
position: fixed;
inset: 0 0 0 auto;
width: calc(var(--hf-sidebar-w) + 16px); /* gutter width */
left: 0;
background: #151515; /* dark outer rail */
z-index: 0;
}
/* Sidebar as a *card* instead of full-height slab */
#mw-panel{
position: fixed;
top: .6rem; /* give it breathing room */
left: .6rem;
bottom: auto; /* no stretch to bottom */
width: var(--hf-sidebar-w);
background: var(--hf-side-bg);
color: var(--hf-side-fg);
border: 1px solid rgba(0,0,0,.25);
border-radius: 14px;
box-shadow: 0 10px 25px rgba(0,0,0,.28), 0 2px 6px rgba(0,0,0,.18);
overflow: hidden; /* round the logo header too */
padding-top: 0; /* header handles its own spacing */
z-index: 3;
max-height: calc(100vh - 1.2rem); /* fits viewport, scrollable */
display: flex;
flex-direction: column;
}
/* Logo/hero header block */
#p-logo{
position: relative;
height: 112px; /* tune for your art */
background:
linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,0)) ,
var(--hf-side-bg); /* fallback if no image */
padding: 0;
border-bottom: 1px solid rgba(0,0,0,.25);
}
#p-logo a{
height: 100%;
text-indent: -9999px;
overflow: hidden;
background-repeat: no-repeat;
background-position: center 55%;
background-size: contain; /* your logo image */
display: block;
}
/* Body of the sidebar scrolls independently */
#mw-panel .portal{
padding: .65rem .8rem;
}
#mw-panel .portal + .portal{
padding-top: .2rem;
border-top: 1px solid rgba(0,0,0,.12);
}
/* Headings – compact, weighty, OSRS-ish */
#mw-panel .portal .portal-heading{
font-weight: 800;
font-size: .92rem;
color: #111;
margin: .35rem .2rem .25rem;
letter-spacing: .2px;
}
/* Link list */
#mw-panel .portal .body{
margin: 0;
padding: 0;
}
#mw-panel .portal .body ul{
list-style: none;
margin: 0;
padding: 0;
}
#mw-panel .portal .body li{
margin: .12rem 0;
}
#mw-panel .portal .body li a{
display: block;
color: #242424;
text-decoration: none;
padding: .28rem .45rem;
border-radius: 8px;
line-height: 1.35;
}
#mw-panel .portal .body li a:hover{
background: rgba(255,255,255,.5);
color: #000;
text-decoration: none;
box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
/* Subtle “Show more…” / utility link style */
#mw-panel .portal .body li a[href*="more"],
#mw-panel .portal .body li a[href*="Show more"]{
opacity: .85;
font-style: italic;
}
/* Make timestamps or small text look muted if present */
#mw-panel .portal .body li small,
#mw-panel .portal .body .mw-changeslist-date{
opacity: .7;
font-size: .86em;
}
/* Discord pill button you can use for a top link */
a.hf-discord-btn{
display: inline-flex;
align-items: center;
gap: .4rem;
background: #5865F2;
color: #fff !important;
border-radius: 10px;
padding: .45rem .6rem;
font-weight: 700;
margin: .55rem .8rem 0;
box-shadow: 0 4px 10px rgba(88,101,242,.35);
}
a.hf-discord-btn:hover{
filter: brightness(1.08);
box-shadow: 0 6px 14px rgba(88,101,242,.45);
text-decoration: none;
}
/* Keep main content offset aligned with the new fixed card */
#content,
.mw-body,
#mw-content,
#mw-head-base,
#mw-head,
.vector-sticky-header{
margin-left: calc(var(--hf-sidebar-w) + 1.2rem);
}
/* Responsive: tighten gutter on smaller widths */
@media (max-width: 1200px){
:root { --hf-sidebar-w: 11.5em; }
#mw-panel{ left: .5rem; }
#content, .mw-body, #mw-content,
#mw-head-base, #mw-head, .vector-sticky-header{
margin-left: calc(var(--hf-sidebar-w) + 1rem);
}
}
@media (max-width: 980px){
:root { --hf-sidebar-w: 10.5em; }
#content, .mw-body, #mw-content,
#mw-head-base, #mw-head, .vector-sticky-header{
margin-left: calc(var(--hf-sidebar-w) + .9rem);
}
}
/* =========================
3) TOP HEADER & TABS
========================= */
#mw-head-base,
#mw-head{
background: var(--hf-topbar-bg);
border-bottom: 1px solid var(--hf-topbar-border);
}
.vector-menu-tabs a{ color: #222; }
.vector-menu-tabs a:hover{ background: rgba(0,0,0,.06); }
.vector-menu-tabs .selected a{
background: rgba(255,255,255,.28);
border-color: rgba(0,0,0,.15);
}
/* =========================
4) HEADINGS & SECTION BARS
========================= */
/* Clean H2/H3 underlined headings (no heavy bars) */
.mw-parser-output h2{
background: transparent !important;
color: var(--hf-h2-fg);
font-weight: 800;
letter-spacing: .2px;
margin: 1rem 0 .6rem;
padding: .1em 0;
border-bottom: 2px solid var(--hf-h2-underline);
border-radius: 0;
}
.mw-parser-output h3{
color: #171717;
font-weight: 700;
border-bottom: 1px solid var(--hf-h2-underline);
padding-bottom: .15em;
margin-top: .9rem;
}
/* Section bars for templates (match sidebar tan) */
.hf-section,
#mf-content{
background: var(--hf-side-bg) !important;
color: #111 !important;
font-weight: 700;
font-variant: small-caps;
padding: .5em .75em !important;
margin: .9rem 0 .6rem !important;
border: 1px solid var(--hf-tan-border) !important;
border-radius: 6px !important;
box-shadow: none !important;
}
/* Last-resort cleanup for old inline greens */
.mw-parser-output [style*="#3c553c"]{
background: transparent !important;
color: inherit !important;
border-color: var(--hf-h2-underline) !important;
}
/* =========================
5) HERO / HEADERTEMPLATE
========================= */
.hf-hero{ margin-top: .7em; margin-bottom: .6rem; }
.hf-hero-table{
width: 100%;
border: 1px solid var(--hf-card-border);
border-radius: 12px;
background: var(--hf-card-bg);
color: var(--hf-fg);
box-shadow: var(--hf-shadow);
}
.hf-hero-left,
.hf-hero-right{ padding: .7em .9em; }
.hf-hero-title{
font-size: 195%;
font-weight: 800;
margin: 0;
}
/* =========================
6) LINKS, LISTS, TABLES, CODE
========================= */
/* Links */
.mw-parser-output a{
color: var(--hf-link);
text-decoration: none;
}
.mw-parser-output a:hover{
color: var(--hf-link-hover);
text-decoration: underline;
}
.mw-parser-output a:visited{ color: var(--hf-link-visited); }
/* Strong, visible focus states (keyboard a11y) */
a:focus,
button:focus,
[role="button"]:focus{
outline: 3px solid rgba(0,0,0,.25);
outline-offset: 2px;
border-radius: 4px;
}
/* Lists breathe a bit more on parchment */
.mw-parser-output ul{ margin-left: 1.25em; }
.mw-parser-output ul li{ margin: .2em 0; line-height: 1.55; }
/* Make long update lists (e.g., Game history) easier to scan */
.mw-parser-output li > a + small,
.mw-parser-output li > small{ opacity:.8; }
/* Tables tuned for light theme */
.wikitable{
background: #fffefa;
border-color: var(--hf-card-border);
border-radius: 10px;
overflow: hidden;
}
.wikitable > * > tr > th{
background: #efe5cb;
border-bottom-color: var(--hf-card-border);
font-weight: 700;
}
.wikitable tr:nth-child(even) td{ background: #fff9eb; }
/* Code blocks (dark for readability) */
pre,
.syntaxhighlight{
background: #232323 !important;
color: #efefef !important;
border: 1px solid #1a1a1a !important;
border-radius: 10px;
padding: .8em 1em !important;
}
/* TOC: compact card */
#toc{
background: var(--hf-card-bg);
border: 1px solid var(--hf-card-border);
border-radius: 10px;
box-shadow: var(--hf-shadow);
}
/* Right-aligned images/cards shouldn't kiss tan bars */
.thumb.tright,
.mw-halign-right .thumb,
.floatright{ margin-left: .75rem; }
/* =========================
7) UTILITY CARD STYLE (apply in wikitext via class="hf-box")
========================= */
.hf-box{
background: var(--hf-card-bg);
border: 1px solid var(--hf-card-border);
border-radius: 10px;
padding: .6em .8em;
margin: .8em 0;
box-shadow: var(--hf-shadow);
}
/* =========================
8) INTERACTIONS / ACCESSIBILITY
========================= */
span[class^="mw-customtoggle-"]{
color: #0645ad;
cursor: pointer;
text-decoration: underline;
font-weight: normal;
}
span[class^="mw-customtoggle-"]:hover{ color: #0b0080; }
#mw-panel .portal .body li a:active,
#mw-panel .portal .body li a:focus{
outline: 2px solid rgba(0,0,0,.18);
outline-offset: 2px;
border-radius: 6px;
}
/* Text selection color */
::selection{ background: var(--hf-selection-bg); color: var(--hf-selection-fg); }
/* Reduced motion preference */
@media (prefers-reduced-motion: reduce){
*{ scroll-behavior: auto !important; }
}
/* =========================
9) RESPONSIVE TWEAKS
========================= */
@media (max-width: 1200px){
:root { --hf-sidebar-w: 11.5em; }
#content, #mw-head, #mw-head-base, .vector-sticky-header,
.mw-body, #mw-content{ margin-left: var(--hf-sidebar-w); }
}
@media (max-width: 980px){
:root { --hf-sidebar-w: 10.5em; }
#content, #mw-head, #mw-head-base, .vector-sticky-header,
.mw-body, #mw-content{ margin-left: var(--hf-sidebar-w); }
}
/* =========================
10) PRINT CLEANUP
========================= */
@media print{
#mw-panel, #mw-head, #mw-head-base, .vector-sticky-header{ display:none !important; }
#content, .mw-body, #mw-content{
margin: 0 !important;
border: none !important;
box-shadow: none !important;
background: #fff !important;
}
}
/* ===== End of Vector overrides ===== */