Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.css

MediaWiki interface page
Revision as of 14:12, 15 November 2025 by SunKeeper (talk | contribs) (Attempting to retain visuals but allow responsive / adaptive sizing flexibility)

Note: After publishing, 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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* ================================
   Sun Keeperverse — Common.css
   Mobile-first, Encarta-style
   ================================ */

/* ---------- Root & palette ---------- */
:root {
  color-scheme: light !important;
  --color-base: #2b2414 !important;
  --color-link: #36c !important;
  --color-link-new: #d33 !important;

  --card-bg: #efe3c1;
  --card-border: #c9b172;
}

/* ---------- Canvas & basic layout ---------- */

html,
body {
  background: #ffffff !important;
  color: var(--color-base) !important;
  margin: 0;
  padding: 0;
}

/* Make main content area full-width on small screens, centered on larger */
.vector-page,
.mw-page-container,
.mw-body,
.mw-content-container {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.mw-body-content,
.vector-body {
  box-sizing: border-box;
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 1.25rem 1.5rem;
}

/* Mobile: reduce side padding and margins to avoid horizontal scroll */
@media (max-width: 720px) {
  .mw-body-content,
  .vector-body {
    margin: 0.75rem auto;
    padding: 0.75rem 0.9rem;
    max-width: 100%;
  }

  /* Avoid weird extra padding on some skins */
  .mw-content-container {
    padding: 0 !important;
  }
}

/* ---------- Typography ---------- */

/* Base text */
body,
.mw-body-content,
.vector-body,
.mw-content-ltr,
.mw-parser-output {
  font-family: Verdana, Geneva, sans-serif !important;
  font-size: 13pt !important;
  line-height: 1.55;
  color: var(--color-base);
}

/* Slightly smaller text on narrow phones */
@media (max-width: 480px) {
  body,
  .mw-body-content,
  .vector-body,
  .mw-content-ltr,
  .mw-parser-output {
    font-size: 12pt !important;
    line-height: 1.5;
  }
}

/* Headings */
.mw-page-title-main,
#firstHeading,
.mw-body h1,
.mw-body h2,
.mw-body h3,
.mw-body h4,
.mw-body h1 .mw-headline,
.mw-body h2 .mw-headline,
.mw-body h3 .mw-headline,
.mw-body h4 .mw-headline {
  font-family: Verdana, Geneva, sans-serif !important;
  font-weight: 400 !important;
  letter-spacing: 0.1px;
  line-height: 1.25;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--color-base);
}

/* Slightly tighter heading margins on mobile */
.mw-body h1,
.mw-body h2 {
  border-bottom: 2px solid #d6c796;
  padding-bottom: 0.45rem;
  margin-bottom: 0.6rem;
  margin-top: 1.2em;
}

@media (max-width: 600px) {
  .mw-body h1,
  .mw-body h2 {
    margin-top: 0.9em;
    margin-bottom: 0.4em;
  }
}

/* Paragraphs, lists */
.mw-body-content {
  padding: 0.85rem 1.1rem;
}

.mw-body-content p {
  margin: 0.9em 0;
}

.mw-body-content ul,
.mw-body-content ol {
  margin: 0.55em 0 0.85em 1.6em;
}

/* Reduce list indentation a bit on small screens */
@media (max-width: 480px) {
  .mw-body-content ul,
  .mw-body-content ol {
    margin-left: 1.2em;
  }
}

/* ---------- Links ---------- */

a,
a:visited {
  color: var(--color-link, #36c) !important;
}

a:hover {
  color: #547c4b !important;
  text-decoration: underline;
}

a.new,
a.new:visited {
  color: var(--color-link-new, #d33) !important;
}

a.new:hover {
  color: #b00000 !important;
  text-decoration: underline;
}

/* ---------- Cards (TOC, tables, info/nav boxes) ---------- */

#toc,
.toc,
.wikitable,
.infobox,
.navbox,
.metadata,
.worldbox,
.worldnav {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* TOC */
#toc,
.toc {
  padding: 0.5em 0.75em;
}

#toc .toctitle {
  color: #5b4a22;
}

#toc ul {
  margin-left: 1.2em;
}

/* Make TOC full-width on mobile for cleaner flow */
@media (max-width: 720px) {
  #toc,
  .toc {
    margin: 0.5rem 0;
    width: 100%;
    box-sizing: border-box;
  }
}

/* Tables */
.wikitable th,
.wikitable td {
  padding: 0.5em 0.75em;
}

.wikitable > tr > th,
.wikitable > * > tr > th {
  background: #e6d7a8;
  border: 1px solid var(--card-border);
  color: var(--color-base);
}

.wikitable > tr > td,
.wikitable > * > tr > td {
  border: 1px solid #ddc996;
}

/* Allow wide tables to scroll instead of blowing up layout */
@media (max-width: 900px) {
  .mw-body-content .wikitable {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ---------- Infobox / navbox layout ---------- */

.infobox,
.navbox,
.metadata,
.worldnav {
  float: right;
  clear: right;
  width: 340px;
  max-width: 42%;
  margin: 0 0 12px 18px;
  padding: 6px;
  box-sizing: border-box;
}

/* Stack boxes on top of content on smaller screens */
@media (max-width: 900px) {
  .infobox,
  .navbox,
  .metadata,
  .worldnav {
    float: none;
    clear: both;
    width: auto;
    max-width: 100%;
    margin: 8px auto;
  }
}

/* Extra-tight on very small phones */
@media (max-width: 480px) {
  .infobox,
  .navbox,
  .metadata,
  .worldnav {
    margin-left: 0;
    margin-right: 0;
    padding: 6px 4px;
  }
}

/* ---------- Titlebar & chrome ---------- */

.vector-page-titlebar {
  padding: 6px 0;
}

/* Sidebar in new Vector */
.vector-feature-zebra-design-enabled .vector-sidebar-container {
  background: transparent;
}

/* Footer */
.mw-footer {
  background: transparent;
  border-top: 1px solid #d6c796;
  color: #6e5d33;
  padding-top: 0.75rem;
}

/* Make footer text smaller on mobile */
@media (max-width: 480px) {
  .mw-footer {
    font-size: 0.85em;
  }
}