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: Difference between revisions

MediaWiki interface page
Attempt at true mobile-framing fix
No edit summary
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* ==============================================
/* =========================================================
   Sun Keeperverse — Encarta-style, MOBILE-FIRST
   SK NAVPAD: ALWAYS ON TOP, NEVER UNDER CITIZEN FOOTER
   ============================================== */
   Put ONLY in MediaWiki:Common.css
  ========================================================= */


/* 0. Stop mobile browsers from auto-zooming text */
/* Always force the navpad to be fixed and above everything */
html {
body.sk-navpad-on #sk-navpad,
  -webkit-text-size-adjust: 100%;
body.sk-navpad-on #sk-navpad.navcell-ui,
  text-size-adjust: 100%;
body.sk-navpad-on .navcell-ui#sk-navpad {
}
   position: fixed !important;
 
   left: 50% !important;
/* 1. Root palette + card colors */
   transform: translateX(-50%) !important;
:root {
  color-scheme: light !important;
  --color-base: #2b2414 !important;
  --color-link: #36c !important;
  --color-link-new: #d33 !important;
 
  --card-bg: #efe3c1;
  --card-border: #c9b172;
}
 
/* 2. Canvas & main layout */
 
html,
body {
  background: #ffffff !important;
  color: var(--color-base) !important;
  margin: 0;
  padding: 0;
}
 
/* Main containers: no boxed white panel, just bright canvas */
.vector-page,
.mw-page-container,
.mw-body,
.mw-content-container {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}
 
/* Desktop-ish width, center the content */
.mw-body-content,
.vector-body {
  box-sizing: border-box;
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 1.25rem 1.5rem;
}
 
/* On phones/tablets, let content use the whole width */
@media (max-width: 1100px) {
  .mw-body-content,
  .vector-body {
    box-sizing: border-box;
    max-width: 100% !important;
    margin: 0.75rem auto !important;
    padding: 0.75rem 1rem !important;
  }
 
  .mw-content-container,
  .mw-page-container,
  .vector-page {
    padding: 0 !important;
  }
}
 
/* 3. Typography */
 
/* Base text: Verdana */
body,
.mw-body-content,
.vector-body,
.mw-content-ltr,
.mw-parser-output {
  font-family: Verdana, Geneva, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.55;
  color: var(--color-base);
}
 
/* Slightly smaller on small phones */
@media (max-width: 720px) {
  body,
  .mw-body-content,
  .vector-body,
  .mw-content-ltr,
  .mw-parser-output {
    font-size: 14px !important;
    line-height: 1.45 !important;
  }
}
 
/* 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);
}
 
/* Heading underline rules */
.mw-body h1,
.mw-body h2 {
  border-bottom: 2px solid #d6c796;
  padding-bottom: 0.45rem;
  margin-bottom: 0.6rem;
  margin-top: 1.2em;
}
 
/* Slightly tighter on small screens */
@media (max-width: 600px) {
  .mw-body h1,
  .mw-body h2 {
    margin-top: 0.9em;
    margin-bottom: 0.4em;
  }
 
  #firstHeading,
  .mw-page-title-main {
    font-size: 1.4em !important;
  }
 
  .mw-body h1 {
    font-size: 1.3em !important;
  }
 
  .mw-body h2 {
    font-size: 1.15em !important;
  }
}


/* Paragraphs & lists */
  /* lift it above phone UI a bit */
.mw-body-content {
  bottom: calc(22px + env(safe-area-inset-bottom, 0px)) !important;
  padding: 0.85rem 1.1rem;
}


.mw-body-content p {
  /* absurdly high, higher than any theme UI */
   margin: 0.9em 0;
   z-index: 2147483647 !important;
}


.mw-body-content ul,
  /* create a new stacking context so it cannot get trapped */
.mw-body-content ol {
   isolation: isolate !important;
   margin: 0.55em 0 0.85em 1.6em;
}


/* Slightly less indent on phones */
   margin: 0 !important;
@media (max-width: 480px) {
   .mw-body-content ul,
  .mw-body-content ol {
    margin-left: 1.2em;
  }
}
}


/* Fix “mystery dot” issue from any gadgets/templates */
/* Reserve space so page content does not sit under it */
.mw-body-content li::before {
body.sk-navpad-on {
   content: none !important;
   padding-bottom: calc(220px + env(safe-area-inset-bottom, 0px)) !important;
}
}


/* 4. Links */
/* Force any footer like thing to never sit on top of the navpad */
 
footer,
a,
#footer,
a:visited {
.mw-footer,
   color: var(--color-link, #36c) !important;
.citizen-footer,
[class*="footer"],
[id*="footer"],
.citizen-ui,
.citizen-ui__footer,
.citizen-ui-footer,
.citizen-toolbar,
.citizen-drawer,
[class*="toolbar"],
[id*="toolbar"],
[class*="drawer"],
[id*="drawer"] {
   position: relative !important;
  z-index: 0 !important;
}
}


a:hover {
/* If Citizen has a fixed bottom bar, keep it under everything */
   color: #547c4b !important;
[class*="sticky"],
  text-decoration: underline;
[id*="sticky"],
[class*="bottom"],
[id*="bottom"] {
   z-index: 0 !important;
}
}


a.new,
/* Hide the pad when you turn it off */
a.new:visited {
@media (max-width: 759px) {
  color: var(--color-link-new, #d33) !important;
   body.sk-navpad-off #sk-navpad,
}
   body.sk-navpad-off #sk-navpad.navcell-ui,
 
   body.sk-navpad-off .navcell-ui#sk-navpad {
a.new:hover {
  color: #b00000 !important;
  text-decoration: underline;
}
 
/* 5. Cards: TOC, tables, infobox, navbox, worldbox */
 
#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 block */
#toc,
.toc {
  padding: 0.5em 0.75em;
}
 
#toc .toctitle {
  color: #5b4a22;
}
 
#toc ul {
  margin-left: 1.2em;
}
 
/* Make TOC a full-width block on smaller screens */
@media (max-width: 1100px) {
   #toc,
  .toc {
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.5rem 0 1rem 0 !important;
    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 horizontally on small screens */
@media (max-width: 900px) {
  .mw-body-content .wikitable {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
 
/* Infobox / navbox / worldnav: desktop */
.infobox,
.navbox,
.metadata,
.worldnav,
.worldbox {
  float: right;
  clear: right;
  width: 340px;
  max-width: 42%;
  margin: 0 0 12px 18px;
  padding: 6px;
  box-sizing: border-box;
}
 
/* Infobox / navbox / worldnav: mobile (stacked) */
@media (max-width: 900px) {
  .infobox,
  .navbox,
  .metadata,
  .worldnav,
  .worldbox {
    float: none !important;
    clear: both !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0.5rem 0 1rem 0 !important;
    padding: 0.6rem 0.75rem !important;
    box-sizing: border-box;
  }
}
 
/* Extra-tight on very small phones */
@media (max-width: 480px) {
  .infobox,
  .navbox,
  .metadata,
   .worldnav,
  .worldbox {
    margin-left: 0;
    margin-right: 0;
    padding: 0.6rem 0.5rem;
  }
}
 
/* 6. Vector 2022 sidebar TOC (blue column) – hide on mobile */
 
@media (max-width: 1100px) {
  .vector-toc,
  .vector-toc-pinned-container,
  .vector-toc-pinnable-header {
     display: none !important;
     display: none !important;
  }
}
/* 7. Titlebar & chrome */
.vector-page-titlebar {
  padding: 6px 0;
}
/* Sidebar container stays transparent */
.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;
}
@media (max-width: 480px) {
  .mw-footer {
    font-size: 0.85em;
   }
   }
}
}

Latest revision as of 07:47, 21 December 2025

/* =========================================================
   SK NAVPAD: ALWAYS ON TOP, NEVER UNDER CITIZEN FOOTER
   Put ONLY in MediaWiki:Common.css
   ========================================================= */

/* Always force the navpad to be fixed and above everything */
body.sk-navpad-on #sk-navpad,
body.sk-navpad-on #sk-navpad.navcell-ui,
body.sk-navpad-on .navcell-ui#sk-navpad {
  position: fixed !important;
  left: 50% !important;
  transform: translateX(-50%) !important;

  /* lift it above phone UI a bit */
  bottom: calc(22px + env(safe-area-inset-bottom, 0px)) !important;

  /* absurdly high, higher than any theme UI */
  z-index: 2147483647 !important;

  /* create a new stacking context so it cannot get trapped */
  isolation: isolate !important;

  margin: 0 !important;
}

/* Reserve space so page content does not sit under it */
body.sk-navpad-on {
  padding-bottom: calc(220px + env(safe-area-inset-bottom, 0px)) !important;
}

/* Force any footer like thing to never sit on top of the navpad */
footer,
#footer,
.mw-footer,
.citizen-footer,
[class*="footer"],
[id*="footer"],
.citizen-ui,
.citizen-ui__footer,
.citizen-ui-footer,
.citizen-toolbar,
.citizen-drawer,
[class*="toolbar"],
[id*="toolbar"],
[class*="drawer"],
[id*="drawer"] {
  position: relative !important;
  z-index: 0 !important;
}

/* If Citizen has a fixed bottom bar, keep it under everything */
[class*="sticky"],
[id*="sticky"],
[class*="bottom"],
[id*="bottom"] {
  z-index: 0 !important;
}

/* Hide the pad when you turn it off */
@media (max-width: 759px) {
  body.sk-navpad-off #sk-navpad,
  body.sk-navpad-off #sk-navpad.navcell-ui,
  body.sk-navpad-off .navcell-ui#sk-navpad {
    display: none !important;
  }
}