Difference between revisions of "MediaWiki:Common.css"

From Holdfast: Nations At War
Jump to navigation Jump to search
Line 1: Line 1:
/* === Holdfast Wiki Global Background === */
+
/* --- Fix top strip: solid header band + left banner/column --- */
:root {
+
:root{
   --hf-banner-w: 1250px;   /* banner width */
+
   --hf-banner-w: 1250px;     /* banner width */
   --hf-banner-h: 300px;   /* banner height */
+
   --hf-banner-h: 150px;     /* banner height */
   --hf-leftcol-w: 320px;   /* sidebar width */
+
   --hf-leftcol-w: 320px;     /* sidebar/left column width */
 
   --hf-parchment: #E1DCCE;
 
   --hf-parchment: #E1DCCE;
 
   --hf-left-top: #2F2D2B;
 
   --hf-left-top: #2F2D2B;
Line 9: Line 9:
 
}
 
}
  
/* Paint all three layers as true page backgrounds */
+
/* remove default spacing so the background reaches the very top edge */
 +
html, body { margin: 0 !important; }
 +
 
 +
/* paint all layers on the page itself */
 
html, body {
 
html, body {
 
   background:
 
   background:
     /* 1) Banner image top-left (no repeat) */
+
     /* L1: full-width top strip so color doesn’t “disappear” at the top */
 +
    linear-gradient(to bottom, var(--hf-parchment) 0, var(--hf-parchment) var(--hf-banner-h)) top left no-repeat,
 +
 
 +
    /* L2: banner image (top-left only) */
 
     url("/Special:FilePath/BannerImage.png") left top no-repeat,
 
     url("/Special:FilePath/BannerImage.png") left top no-repeat,
     /* 2) Dark left column gradient running full height */
+
 
     linear-gradient(to bottom, var(--hf-left-top) 0%, var(--hf-left-bot) 100%) left top repeat-y,
+
     /* L3: dark left column running full height */
     /* 3) Parchment for everything else */
+
     linear-gradient(to bottom, var(--hf-left-top), var(--hf-left-bot)) left top repeat-y,
 +
 
 +
     /* L4: parchment base for everything else */
 
     var(--hf-parchment);
 
     var(--hf-parchment);
 
   background-size:
 
   background-size:
     var(--hf-banner-w) var(--hf-banner-h), /* banner strip */
+
    100% var(--hf-banner-h),          /* top strip covers full width */
     var(--hf-leftcol-w) 100%,               /* dark column */
+
     var(--hf-banner-w) var(--hf-banner-h), /* banner patch */
 +
     var(--hf-leftcol-w) 100%,         /* left column width */
 
     auto;
 
     auto;
   background-attachment: fixed, fixed, fixed;
+
   background-attachment: fixed, fixed, fixed, fixed;
  background-color: var(--hf-parchment);
 
 
}
 
}
  
/* Make site chrome transparent so it overlays the page background */
+
/* ensure header chrome is transparent so the backgrounds show cleanly */
 +
#mw-page-base,
 +
#mw-head-base,
 
#mw-head,
 
#mw-head,
.vector-header-container,
+
.vector-header-container { background: transparent !important; }
#mw-page-base, #mw-head-base,
 
#mw-panel, #column-one, .mw-sidebar {
 
  background: transparent !important;
 
}
 
  
/* Content panels stay opaque parchment */
+
/* main content stays opaque parchment so the dark column doesn’t bleed under it */
 
#content, .mw-body, .vector-body .mw-body,
 
#content, .mw-body, .vector-body .mw-body,
 
.mw-workspace-container, .mw-content-container {
 
.mw-workspace-container, .mw-content-container {
Line 40: Line 46:
 
}
 
}
  
/* Sidebar text/link colors for readability */
+
/* sidebar overlays the left column; keep it transparent and readable */
#mw-panel, #column-one, .mw-sidebar { color: #EEEDEB !important; }
+
#mw-panel, #column-one, .mw-sidebar { background: transparent !important; color: #EEEDEB !important; }
#mw-panel a, #column-one a, .mw-sidebar a {
+
#mw-panel a, #column-one a, .mw-sidebar a { color: #EEEDEB !important; text-decoration: none; }
  color: #EEEDEB !important; text-decoration: none;
+
#mw-panel a:hover, #column-one a:hover, .mw-sidebar a:hover { color: #5A65EA !important; text-decoration: underline; }
}
 
#mw-panel a:hover, #column-one a:hover, .mw-sidebar a:hover {
 
  color: #5A65EA !important; text-decoration: underline;
 
}
 

Revision as of 09:45, 10 October 2025

/* --- Fix top strip: solid header band + left banner/column --- */
:root{
  --hf-banner-w: 1250px;     /* banner width */
  --hf-banner-h: 150px;      /* banner height */
  --hf-leftcol-w: 320px;     /* sidebar/left column width */
  --hf-parchment: #E1DCCE;
  --hf-left-top: #2F2D2B;
  --hf-left-bot: #1E1E1D;
}

/* remove default spacing so the background reaches the very top edge */
html, body { margin: 0 !important; }

/* paint all layers on the page itself */
html, body {
  background:
    /* L1: full-width top strip so color doesn’t “disappear” at the top */
    linear-gradient(to bottom, var(--hf-parchment) 0, var(--hf-parchment) var(--hf-banner-h)) top left no-repeat,

    /* L2: banner image (top-left only) */
    url("/Special:FilePath/BannerImage.png") left top no-repeat,

    /* L3: dark left column running full height */
    linear-gradient(to bottom, var(--hf-left-top), var(--hf-left-bot)) left top repeat-y,

    /* L4: parchment base for everything else */
    var(--hf-parchment);
  background-size:
    100% var(--hf-banner-h),           /* top strip covers full width */
    var(--hf-banner-w) var(--hf-banner-h), /* banner patch */
    var(--hf-leftcol-w) 100%,          /* left column width */
    auto;
  background-attachment: fixed, fixed, fixed, fixed;
}

/* ensure header chrome is transparent so the backgrounds show cleanly */
#mw-page-base,
#mw-head-base,
#mw-head,
.vector-header-container { background: transparent !important; }

/* main content stays opaque parchment so the dark column doesn’t bleed under it */
#content, .mw-body, .vector-body .mw-body,
.mw-workspace-container, .mw-content-container {
  background: var(--hf-parchment) !important;
}

/* sidebar overlays the left column; keep it transparent and readable */
#mw-panel, #column-one, .mw-sidebar { background: transparent !important; color: #EEEDEB !important; }
#mw-panel a, #column-one a, .mw-sidebar a { color: #EEEDEB !important; text-decoration: none; }
#mw-panel a:hover, #column-one a:hover, .mw-sidebar a:hover { color: #5A65EA !important; text-decoration: underline; }