MediaWiki:Common.css: Difference between revisions

From Questlandia Wiki
Jump to navigation Jump to search
No edit summary
Undo revision 82 by Gridcaster (talk)
Tag: Undo
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oldenburg:wght@400;700&display=swap');


/* ——————————————————————————————————————————
/* ─────────────────────────────────────────────────────────
   Base & Background
   Base & Background
  —————————————————————————————————————————— */
───────────────────────────────────────────────────────── */
html, body {
html, body {
   font-family: 'Cinzel', Georgia, serif;
  margin: 0; padding: 0;
   font-family: 'Oldenburg', Georgia, serif;
   background: url('/images/wiki_background.png') center center fixed no-repeat;
   background: url('/images/wiki_background.png') center center fixed no-repeat;
   background-size: cover;
   background-size: cover;
   color: #eee;
   color: #333;
}
}


/* ——————————————————————————————————————————
/* ─────────────────────────────────────────────────────────
   Header (top bar)
   Header Bar Colors
  —————————————————————————————————————————— */
───────────────────────────────────────────────────────── */
#mw-head {
#mw-head {
  background: #4B0082;
   border-bottom: 3px solid #F28C28 !important;
   border-bottom: 3px solid #F28C28;
  padding: 0.5em 2em;
}
}
#p-personal, #p-search { /* user links & search */
 
  background: rgba(255,255,255,0.9);
#mw-list-item {
  border-radius: 6px;
color: #202122;
  padding: 0.4em 0.8em;
  margin: 0.5em;
}
}
#p-personal a, #p-search a {
 
   color: #4B0082 !important;
#left-navigation {
  text-decoration: none;
   background-color: #c4b7dc;
}
}
#p-personal a:hover, #p-search a:hover {
 
  color: #E67E22 !important;
#mw-page-base {
    background-color: #c4b7dc;
}
}


/* ——————————————————————————————————————————
#mw-head {
  Sidebar
    background-color: #c4b7dc;
  —————————————————————————————————————————— */
#mw-panel {
  background: rgba(255,255,255,0.9);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  margin: 1em;
  padding: 1em;
}
}
/* add spacing between sidebar and content */
 
#mw-body {
#mw-head-base {
  display: flex;
    background-color: #c4b7dc;
}
#mw-content-text {
  margin-left: 1em;
}
}


/* ——————————————————————————————————————————
/* Style each portlet in the header (namespaces/tabs, search, personal) */
  Content box
  —————————————————————————————————————————— */
#content {
  background: rgba(255,255,255,0.95);
  border-radius: 10px;
  padding: 2em;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  margin-bottom: 2em;
}


/* ——————————————————————————————————————————
#p-namespaces .body,
  Headings & Links
#p-cactions .body,
  —————————————————————————————————————————— */
#p-search .body,
h1, h2, h3 {
#p-personal .body {
   color: #C0392B;
   background: rgba(255,255,255,0.9) !important;
}
   border-radius: 4px !important;
a {
  padding: 0.2em 0.6em !important;
   color: #229C88;
   margin: 0.5em !important;
}
a:hover {
   color: #D645B1;
}
}


/* ——————————————————————————————————————————
/* Link colors in those header boxes */
  Tables
#p-namespaces a,
  —————————————————————————————————————————— */
#p-cactions a {
table.wikitable {
   color: #229C88 !important;
  width: 100%;
  border-collapse: collapse;
   background: transparent;
  margin-bottom: 2em;
}
}
table.wikitable caption {
#p-namespaces .selected a,
  background: #4B0082;
#p-cactions .selected a {
  color: #fff;
   background: #E0D6F9 !important;
  padding: 0.5em;
   color: #4B0082 !important;
  font-weight: bold;
}
table.wikitable th {
   background: #E0D6F9;
   color: #222;
  border: 1px solid #ccc;
  padding: 0.6em;
}
}
table.wikitable td {
#p-search input,
  background: transparent;
#p-search button,
  border: 1px solid #ccc;
#p-personal a {
   padding: 0.6em;
   color: #202122 !important;
}
}


/* ——————————————————————————————————————————
  Footer
  —————————————————————————————————————————— */
#footer {
  background: #4B0082;
  color: #ccc;
  padding: 1em;
  text-align: center;
  border-top: 2px solid #D645B1;
}
#footer a {
  color: #eee !important;
}
#footer a:hover {
  color: #fff !important;
  text-decoration: underline;
}


/* ——————————————————————————————————————————
  Body Wrapper: side‑by‑side layout with gap
  —————————————————————————————————————————— */
#mw-body-wrapper {
  display: flex;
  flex-wrap: wrap;        /* allow stacking on narrow viewports */
  gap: 20px;              /* space between sidebar and content */
  align-items: flex-start;
  margin: 0 20px;        /* overall horizontal padding */
}


/* ——————————————————————————————————————————
/* ─────────────────────────────────────────────────────────
   Sidebar
   Sidebar & Content Skinning Only
  —————————————————————————————————————————— */
───────────────────────────────────────────────────────── */
#mw-panel {
#mw-panel {
  flex: 0 0 250px;        /* fixed width */
   background: #c4b7dc !important;
   background: rgba(255,255,255,0.95);
   border-radius: 8px !important;
   border-radius: 8px;    /* rounded corners */
  padding: 1em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
}
/* ——————————————————————————————————————————
  Main Content Area
  —————————————————————————————————————————— */
#content {
#content {
  flex: 1 1 auto;        /* fill remaining space */
   background: #c4b7dc !important;
   background: rgba(255,255,255,0.95);
   border-radius: 8px !important;
  border-radius: 8px;     /* rounded corners */
  padding: 2em;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  overflow: visible;      /* prevent inner overlap */
}
 
/* ——————————————————————————————————————————
  Header & Footer Panels
  —————————————————————————————————————————— */
#mw-head, #footer {
   border-radius: 8px;     /* soften all major containers */
}
}


/* ——————————————————————————————————————————
.box {
  Ensure No Overlap on Smaller Screens
  padding: 1em;          /* or 15px, 1.5em, whatever you like */
  —————————————————————————————————————————— */
   background-clip: padding-box; /* keeps the background within the rounded corners */
@media (max-width: 800px) {
   #mw-body-wrapper {
    flex-direction: column;
    gap: 10px;
    margin: 0 10px;
  }
  #mw-panel {
    width: 100% !important;
  }
  #content {
    width: 100% !important;
  }
}
}


/* 1. Make the Vector body wrapper flex instead of floats */
#mw-body {
  display: flex;
  flex-wrap: wrap;        /* allow stacking on narrow viewports */
  gap: 20px;              /* space between sidebar and content */
  align-items: flex-start;
  margin: 0 20px;
}


/* 2. Disable the old float on the sidebar portlet */
/* ─────────────────────────────────────────────────────────
#mw-panel {
  Headings & Links
   float: none !important;
───────────────────────────────────────────────────────── */
  flex: 0 0 250px;        /* fixed sidebar width */
h1, h2, h3, h4 {
   color: #C0392B !important;
}
}
 
a {
/* 3. Let content fill remaining space */
   color: #202122 !important;
#content, #mw-content-text {
   flex: 1 1 auto;
  width: auto !important; /* override any inline widths */
}
}
 
a:hover {
/* 4. Ensure inner elements don’t collapse */
   color: #D645B1 !important;
#mw-body > * {
   min-width: 0;           /* allow flex children to shrink */
}
}


/* 5. Rounded corners everywhere */
#mw-panel,
#content,
#mw-head,
#footer {
  border-radius: 8px;
}
/* ——————————————————————————————————————————
  Vector sidebar & content layout fix
  —————————————————————————————————————————— */


/* 1. Sidebar: fixed width, remove any floats, add margin & rounding */
.vector-search-box-input {
#mw-panel {
   background-color: #fff;
   position: relative !important;
  float: none !important;
  width: 240px !important;
  margin: 20px !important;    /* space around the panel */
  border-radius: 8px !important;
  z-index: 2;
}
}


/* 2. Push the main content over so it sits to the right of the sidebar */
/* ─────────────────────────────────────────────────────────
#content, #mw-content-text {
  Tables
   position: relative;
───────────────────────────────────────────────────────── */
   margin: 20px 20px 20px 300px !important; /* left margin = sidebar width + gap */
table.wikitable caption {
  border-radius: 8px;                      /* match corners */
   background: #4B0082 !important;
  z-index: 1;
   color: #fff !important;
}
}
 
table.wikitable th {
/* 3. Ensure the header stays on top */
   background: #E0D6F9 !important;
#mw-head {
   position: relative;
  z-index: 10;
}
}


/* 4. Responsive fallback: stack on small screens */
/* ─────────────────────────────────────────────────────────
@media (max-width: 900px) {
  Footer Bar
   #mw-panel, #content, #mw-content-text {
───────────────────────────────────────────────────────── */
    float: none !important;
#footer {
    width: auto !important;
   border-top: 2px solid #D645B1 !important;
    margin: 10px !important;
  color: #eee !important;
  }
  border-radius: 0 0 8px 8px !important;
}
}
 
#footer a {
 
   color: #ddd !important;
/* === RESET to float layout === */
#mw-body, #mw-body-wrapper {
   display: block !important;
}
}
 
#footer a:hover {
/* === Sidebar float-based layout === */
   color: #fff !important;
#mw-panel {
   float: left !important;
  width: 250px !important;
  margin: 1em !important;        /* space around the panel */
  border-radius: 8px !important;  /* rounded corners */
  background: rgba(255,255,255,0.95) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
  z-index: 2;
}
 
/* === Content cleared to right of sidebar === */
#mw-content-text, #content {
  margin: 1em 1em 2em calc(250px + 1em) !important; /* left = sidebar width + sidebar left margin */
  border-radius: 8px !important;
  background: rgba(255,255,255,0.95) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1) !important;
  z-index: 1;
}
 
/* === Ensure header/footer stay full width on top/back === */
#mw-head, #footer {
  clear: both;
  position: relative;
  z-index: 10;
}
}


/* === Mobile stack fallback === */
.mw-footer li {
@media (max-width: 800px) {
color: white;
  #mw-panel, #mw-content-text, #content {
    float: none !important;
    width: auto !important;
    margin: 1em !important;
  }
}
}

Latest revision as of 17:13, 19 April 2025

@import url('https://fonts.googleapis.com/css2?family=Oldenburg:wght@400;700&display=swap');

/* ─────────────────────────────────────────────────────────
   Base & Background
───────────────────────────────────────────────────────── */
html, body {
  margin: 0; padding: 0;
  font-family: 'Oldenburg', Georgia, serif;
  background: url('/images/wiki_background.png') center center fixed no-repeat;
  background-size: cover;
  color: #333;
}

/* ─────────────────────────────────────────────────────────
   Header Bar Colors
───────────────────────────────────────────────────────── */
#mw-head {
  border-bottom: 3px solid #F28C28 !important;
}

#mw-list-item {
	color: #202122;
}

#left-navigation {
  background-color: #c4b7dc;
}

#mw-page-base {
    background-color: #c4b7dc;
}

#mw-head {
    background-color: #c4b7dc;
}

#mw-head-base {
    background-color: #c4b7dc;
}

/* Style each portlet in the header (namespaces/tabs, search, personal) */

#p-namespaces .body,
#p-cactions .body,
#p-search .body,
#p-personal .body {
  background: rgba(255,255,255,0.9) !important;
  border-radius: 4px !important;
  padding: 0.2em 0.6em !important;
  margin: 0.5em !important;
}

/* Link colors in those header boxes */
#p-namespaces a,
#p-cactions a {
  color: #229C88 !important;
}
#p-namespaces .selected a,
#p-cactions .selected a {
  background: #E0D6F9 !important;
  color: #4B0082 !important;
}
#p-search input,
#p-search button,
#p-personal a {
  color: #202122 !important;
}



/* ─────────────────────────────────────────────────────────
   Sidebar & Content Skinning Only
───────────────────────────────────────────────────────── */
#mw-panel {
  background: #c4b7dc !important;
  border-radius: 8px !important;
}
#content {
  background: #c4b7dc !important;
  border-radius: 8px !important;
}

.box {
  padding: 1em;          /* or 15px, 1.5em, whatever you like */
  background-clip: padding-box; /* keeps the background within the rounded corners */
}


/* ─────────────────────────────────────────────────────────
   Headings & Links
───────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  color: #C0392B !important;
}
a {
  color: #202122 !important;
}
a:hover {
  color: #D645B1 !important;
}


.vector-search-box-input {
  background-color: #fff;	
}

/* ─────────────────────────────────────────────────────────
   Tables
───────────────────────────────────────────────────────── */
table.wikitable caption {
  background: #4B0082 !important;
  color: #fff !important;
}
table.wikitable th {
  background: #E0D6F9 !important;
}

/* ─────────────────────────────────────────────────────────
   Footer Bar
───────────────────────────────────────────────────────── */
#footer {
  border-top: 2px solid #D645B1 !important;
  color: #eee !important;
  border-radius: 0 0 8px 8px !important;
}
#footer a {
  color: #ddd !important;
}
#footer a:hover {
  color: #fff !important;
}

.mw-footer li {
	color: white;
}