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
m Cleaning up formatting issues on mobile browsers
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* ================================
/* =========================================================
   Sun Keeperverse — Common.css
   SK NAVPAD: ALWAYS ON TOP, NEVER UNDER CITIZEN FOOTER
   Mobile-first, Encarta-style
  Put ONLY in MediaWiki:Common.css
  ================================ */
   ========================================================= */


/* ---------- Root & palette ---------- */
/* Always force the navpad to be fixed and above everything */
:root {
body.sk-navpad-on #sk-navpad,
   color-scheme: light !important;
body.sk-navpad-on #sk-navpad.navcell-ui,
   --color-base: #2b2414 !important;
body.sk-navpad-on .navcell-ui#sk-navpad {
   --color-link: #36c !important;
   position: fixed !important;
  --color-link-new: #d33 !important;
   left: 50% !important;
   transform: translateX(-50%) !important;


   --card-bg: #efe3c1;
   /* lift it above phone UI a bit */
   --card-border: #c9b172;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px)) !important;
}
 
  /* absurdly high, higher than any theme UI */
   z-index: 2147483647 !important;


/* ---------- Canvas & basic layout ---------- */
  /* create a new stacking context so it cannot get trapped */
  isolation: isolate !important;


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


/* Main containers */
/* Reserve space so page content does not sit under it */
.vector-page,
body.sk-navpad-on {
.mw-page-container,
   padding-bottom: calc(220px + env(safe-area-inset-bottom, 0px)) !important;
.mw-body,
.mw-content-container {
   background: transparent
 
/* ====================================
  MOBILE OVERRIDES – LAYOUT + TYPO
  ==================================== */
 
/* 1. saner font sizes on small screens */
@media (max-width: 1100px) {
  body,
  .mw-body-content,
  .vector-body,
  .mw-content-ltr,
  .mw-parser-output {
    font-size: 15px !important;
    line-height: 1.5 !important;
  }
}
}


@media (max-width: 720px) {
/* Force any footer like thing to never sit on top of the navpad */
  body,
footer,
  .mw-body-content,
#footer,
  .vector-body,
.mw-footer,
  .mw-content-ltr,
.citizen-footer,
  .mw-parser-output {
[class*="footer"],
    font-size: 14px !important;
[id*="footer"],
    line-height: 1.45 !important;
.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;
}
}


/* 2. main content: full-width, no weird gutters */
/* If Citizen has a fixed bottom bar, keep it under everything */
@media (max-width: 1100px) {
[class*="sticky"],
  .mw-body-content,
[id*="sticky"],
  .vector-body {
[class*="bottom"],
    box-sizing: border-box;
[id*="bottom"] {
    max-width: 100% !important;
   z-index: 0 !important;
    margin: 0.75rem auto !important;
    padding: 0.75rem 1rem !important;
  }
 
  .mw-content-container,
  .mw-page-container,
   .vector-page {
    padding: 0 !important;
  }
}
}


/* 3. kill the sidebar TOC on mobile (Vector 2022) */
/* Hide the pad when you turn it off */
@media (max-width: 1100px) {
@media (max-width: 759px) {
   .vector-toc,
   body.sk-navpad-off #sk-navpad,
   .vector-toc-pinned-container,
   body.sk-navpad-off #sk-navpad.navcell-ui,
   .vector-toc-pinnable-header {
   body.sk-navpad-off .navcell-ui#sk-navpad {
     display: none !important;
     display: none !important;
  }
}
/* 4. infobox / navbox / worldnav: stack under heading */
@media (max-width: 1100px) {
  .infobox,
  .navbox,
  .metadata,
  .worldnav {
    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;
  }
}
/* 5. headings: slightly smaller so they don't dominate */
@media (max-width: 600px) {
  #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;
   }
   }
}
}

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;
  }
}