MediaWiki:Common.css

Revision as of 17:50, 16 September 2026 by Admin (talk | contribs) (Import from wiki-src)

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.
/* =========================================================================
   Mohan Wiki — site-wide styles (MediaWiki:Common.css)

   Recreates the article furniture readers know from Wikipedia: infoboxes,
   hatnotes, message boxes, navboxes, reference lists and the Main Page.
   Colours use Codex design tokens (var(--...)) with light fallbacks, so every
   component follows Vector 2022's light/dark setting automatically.
   ========================================================================= */

/* "From Mohan Wiki" under each title, as on Wikipedia */
#siteSub { display: block; }

/* Main Page: no title, no tagline */
body.page-Main_Page.action-view .mw-first-heading,
body.page-Main_Page.action-view #siteSub { display: none; }

/* Wordmark and tagline are dark SVG text; flip them in dark mode */
html.skin-theme-clientpref-night .mw-logo-wordmark,
html.skin-theme-clientpref-night .mw-logo-tagline { filter: invert(1) hue-rotate(180deg); }
@media screen and (prefers-color-scheme: dark) {
  html.skin-theme-clientpref-os .mw-logo-wordmark,
  html.skin-theme-clientpref-os .mw-logo-tagline { filter: invert(1) hue-rotate(180deg); }
}

/* ---------------------------------------------------------------- Infobox */
.infobox {
  float: right; clear: right;
  width: 22em;
  margin: 0.5em 0 0.5em 1em;
  padding: 0.2em;
  border: 1px solid var(--border-color-base, #a2a9b1);
  border-spacing: 3px;
  background-color: var(--background-color-neutral-subtle, #f8f9fa);
  color: var(--color-base, #202122);
  font-size: 88%;
  line-height: 1.5em;
}
.infobox-title {
  caption-side: top;
  padding: 0.2em;
  font-size: 125%;
  font-weight: bold;
  text-align: center;
  line-height: 1.3em;
}
.infobox-above { font-size: 125%; font-weight: bold; text-align: center; }
.infobox-image { text-align: center; padding: 0.3em 0; }
.infobox-caption { font-size: 94%; text-align: center; padding-top: 0.2em; }
.infobox-header {
  text-align: center;
  background-color: var(--background-color-interactive, #eaecf0);
  padding: 0.2em 0.3em;
}
.infobox-label { text-align: left; vertical-align: top; padding-right: 0.6em; white-space: normal; }
.infobox-data, .infobox-full-data { vertical-align: top; text-align: left; }
.infobox-full-data { text-align: center; }
.infobox-below { text-align: center; font-size: 94%; }
.infobox th, .infobox td { padding: 0.15em 0.3em; }

/* ---------------------------------------------------------------- Hatnote */
.hatnote {
  font-style: italic;
  padding-left: 1.6em;
  margin-bottom: 0.5em;
}
.hatnote i { font-style: normal; }

/* ---------------------------------------------------------- Message boxes */
.ambox {
  /* flex + overflow:hidden starts a new formatting context, so the box
     shrinks to fit beside a floated infobox instead of dropping below it */
  display: flex;
  align-items: center;
  gap: 0.7em;
  overflow: hidden;
  margin: 0 0 0.8em;
  padding: 0.35em 0.8em 0.35em 0.9em;
  border: 1px solid var(--border-color-base, #a2a9b1);
  border-left: 10px solid #36c;
  background-color: var(--background-color-neutral-subtle, #fbfbfb);
  font-size: 95%;
}
.ambox .mbox-image { flex: 0 0 auto; }
.ambox .mbox-text { flex: 1 1 auto; min-width: 0; }
.mbox-icon {
  display: inline-block; width: 36px; height: 36px; line-height: 36px;
  border-radius: 50%; color: #fff; font-weight: bold; font-size: 22px;
  font-family: Georgia, "Times New Roman", serif; text-align: center;
  background-color: #36c;
}
.ambox-content { border-left-color: #f28500; }
.ambox-content .mbox-icon { background-color: #f28500; }
.ambox-style   { border-left-color: #fc3; }
.ambox-style .mbox-icon { background-color: #d9a400; }
.ambox-delete  { border-left-color: #b32424; }
.ambox-delete .mbox-icon { background-color: #b32424; }

/* Inline [citation needed] / [confirmation needed] */
.Inline-Template { font-size: 80%; white-space: nowrap; }

/* ----------------------------------------------------------- References */
.reflist { font-size: 90%; margin-bottom: 0.5em; }
.reflist ol.references { margin-top: 0.3em; }
cite.citation { font-style: inherit; word-wrap: break-word; }

/* ---------------------------------------------------------------- Navbox */
.navbox {
  clear: both;
  box-sizing: border-box;
  width: 100%;
  margin: 1em auto 0;
  padding: 1px;
  border: 1px solid var(--border-color-base, #a2a9b1);
  font-size: 88%;
  text-align: center;
  background-color: var(--background-color-base, #fdfdfd);
}
.navbox-inner { width: 100%; border-spacing: 0; }
.navbox-title {
  padding: 0.25em 1em;
  font-weight: bold;
  font-size: 114%;
  background-color: var(--background-color-progressive-subtle, #ccccff);
}
.navbox-group {
  white-space: nowrap;
  text-align: right;
  font-weight: bold;
  padding: 0.25em 1em;
  background-color: var(--background-color-progressive-subtle, #ddddff);
  width: 1%;
}
.navbox-list { text-align: left; padding: 0.25em 0.5em; border-left: 2px solid var(--background-color-base, #fdfdfd); }
.navbox-odd  { background-color: transparent; }
.navbox-even { background-color: var(--background-color-neutral-subtle, #f7f7f7); }

/* ----------------------------------------------------------- Main Page */
#mp-topbanner {
  position: relative;
  margin: 0.6em 0 1em;
  padding: 0.7em 1em;
  border: 1px solid var(--border-color-base, #a2a9b1);
  background-color: var(--background-color-neutral-subtle, #f8f9fa);
  text-align: center;
}
#mp-welcome { font-size: 162%; line-height: 1.4; margin: 0.2em 0; font-family: "Linux Libertine", Georgia, Times, serif; }
#mp-free { font-size: 95%; margin: 0.2em 0 0; }
#mp-upper { display: flex; gap: 1em; flex-wrap: wrap; margin-bottom: 1em; }
#mp-left, #mp-right {
  flex: 1 1 22em;
  border: 1px solid #a3bfb1;
  background-color: var(--background-color-success-subtle, #f5fffa);
  padding: 0 0.6em 0.6em;
}
#mp-right { border-color: #a3b0bf; background-color: var(--background-color-progressive-subtle, #f5faff); }
.mp-h2 {
  margin: 0.5em 0 0.4em !important;
  padding: 0.2em 0.4em !important;
  font-size: 120% !important;
  font-weight: bold !important;
  font-family: inherit !important;
  border: 1px solid #a3bfb1 !important;
  background-color: #cef2e0;
  color: #000;
}
#mp-right .mp-h2 { border-color: #a3b0bf !important; background-color: #cedff2; }
#mp-lower, #mp-bottom {
  border: 1px solid #a3b0bf;
  padding: 0 0.6em 0.6em;
  margin-bottom: 1em;
  background-color: var(--background-color-base, #fff);
}
#mp-lower .mp-h2 { border-color: #a3b0bf !important; background-color: #cedff2; }
#mp-bottom .mp-h2 { border-color: #a2a9b1 !important; background-color: #eaecf0; }
.mp-more { text-align: right; font-weight: bold; font-size: 95%; }
html.skin-theme-clientpref-night .mp-h2 { color: #202122; }

/* Grid of links on the Main Page */
.mp-areas { display: flex; flex-wrap: wrap; gap: 0.4em 1.5em; }
.mp-areas > div { flex: 1 1 14em; }

/* ------------------------------------------------------------- Phones */
@media screen and (max-width: 720px) {
  .infobox { float: none; width: 100%; margin: 0 0 1em; }
  .navbox-group { white-space: normal; }
}