MediaWiki:Common.css

From MB Wiki
Revision as of 07:31, 8 May 2026 by Ais (talk | contribs)
Jump to navigation Jump to search

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)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* ============================================
   COMMON.CSS – Minimal, variable‑driven base
   Requires MediaWiki:Theme-Mana.css or Theme-Break.css
   ============================================ */

/* Reset some MediaWiki defaults */
html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--theme-body-background, #F5F9FC);
    color: var(--theme-body-text, #1A1A1A);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

/* ---- Main layout (Vector skin) ---- */
#content {
    background: var(--theme-page-background, #EAF2F5);
    border: 1px solid var(--theme-border-color-accent, rgba(0,0,0,0.25));
    border-radius: 6px;
    margin: 1em 0;
    padding: 1.5em;
    box-shadow: var(--theme-shadow-small, 0 1px 3px rgba(0,0,0,0.12));
}

.mw-body {
    background: transparent;
    border: none;
}

/* ---- Sidebar ---- */
#mw-panel {
    background: var(--theme-widget-background-solid, #FFFFFF);
    border: 1px solid var(--theme-border-color-accent, rgba(0,0,0,0.25));
    border-radius: 6px;
    padding: 0.5em;
    box-shadow: var(--theme-shadow-small, 0 1px 3px rgba(0,0,0,0.12));
}

#mw-panel .portal .body {
    margin-left: 0.5em;
}

#mw-panel .portal h3 {
    color: var(--theme-heading-color, #1A1A1A);
    font-size: 1.1em;
    margin-top: 1em;
    border-bottom: 1px solid var(--theme-border-color-light, rgba(0,0,0,0.06));
    padding-bottom: 0.2em;
}

#mw-panel .portal li a {
    color: var(--theme-link-color, #005B9F);
}

#mw-panel .portal li a:hover {
    color: var(--theme-link-color-hover, #003D6B);
    text-decoration: underline;
}

/* ---- Top navigation (tabs, search) ---- */
#mw-head {
    background: var(--theme-widget-background, rgba(255,255,255,0.75));
    border-bottom: 1px solid var(--theme-border-color, rgba(0,0,0,0.12));
    padding: 0.3em 1em;
}

#p-search input {
    background-color: var(--theme-widget-background-solid, #FFFFFF);
    border: 1px solid var(--theme-border-color-accent, rgba(0,0,0,0.25));
    color: var(--theme-body-text, #1A1A1A);
    padding: 0.3em 0.5em;
    border-radius: 4px;
}

#p-search input:focus {
    border-color: var(--theme-accent-color, #00A896);
    outline: none;
    box-shadow: 0 0 0 1px var(--theme-accent-color, #00A896);
}

.vector-menu-tabs li a {
    color: var(--theme-body-text, #1A1A1A) !important;
}

.vector-menu-tabs li.selected a {
    color: var(--theme-accent-color, #00A896) !important;
    border-bottom: 2px solid var(--theme-accent-color, #00A896);
}

.vector-menu-tabs li a:hover {
    color: var(--theme-link-color-hover, #003D6B) !important;
}

/* ---- Footer ---- */
#footer {
    background: var(--theme-widget-background, rgba(255,255,255,0.75));
    border-top: 1px solid var(--theme-border-color, rgba(0,0,0,0.12));
    color: var(--theme-body-text-muted, #5A5A5A);
    font-size: 0.9em;
}

#footer a {
    color: var(--theme-link-color, #005B9F);
}

/* ---- Links ---- */
a {
    color: var(--theme-link-color, #005B9F);
}

a:visited {
    color: var(--theme-link-color-visited, #673AB7);
}

a:hover {
    color: var(--theme-link-color-hover, #003D6B);
}

a.new, a.new:visited {
    color: var(--theme-link-color-new, #D32F2F);
}

/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 {
    color: var(--theme-heading-color, #1A1A1A);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

h1 {
    border-bottom: 1px solid var(--theme-border-color-accent, rgba(0,0,0,0.25));
    padding-bottom: 0.2em;
    font-size: 2em;
}

h2 {
    border-bottom: 1px solid var(--theme-border-color-light, rgba(0,0,0,0.06));
    padding-bottom: 0.2em;
    font-size: 1.5em;
}

/* ---- Table of Contents ---- */
.toc {
    background: var(--theme-toc-background, rgba(255,255,255,0.5));
    border: 1px solid var(--theme-toc-border, rgba(0,0,0,0.25));
    border-radius: 6px;
    padding: 0.8em;
    font-size: 0.95em;
}

.toc .toctitle h2 {
    color: var(--theme-heading-color, #1A1A1A);
    font-size: 1.2em;
    border-bottom: none;
    margin: 0;
}

.toc ul {
    list-style: none;
    margin-left: 0;
}

.toc a {
    color: var(--theme-toc-link-color, #1A1A1A);
}

.toc .tocnumber {
    color: var(--theme-toc-number-color, #5A5A5A);
}

/* ---- Thumbnails ---- */
.thumb .thumbinner {
    background: var(--theme-box-background, rgba(255,255,255,0.6));
    border: 1px solid var(--theme-border-color-light, rgba(0,0,0,0.06));
    border-radius: 4px;
    padding: 4px;
    font-size: 0.9em;
}

.thumbcaption {
    color: var(--theme-body-text-muted, #5A5A5A);
}

/* ---- Tables ---- */
table.wikitable {
    background: transparent;
    border-collapse: collapse;
    color: var(--theme-body-text, #1A1A1A);
}

table.wikitable th,
table.wikitable td {
    border: 1px solid var(--theme-border-color-accent, rgba(0,0,0,0.25));
    padding: 0.3em 0.6em;
}

table.wikitable th {
    background: var(--theme-highlight-background, rgba(0,0,0,0.05));
    font-weight: bold;
}

table.wikitable tr:hover td {
    background: var(--theme-highlight-background, rgba(0,0,0,0.05));
}

/* ---- Category links ---- */
.catlinks {
    background: var(--theme-widget-background, rgba(255,255,255,0.75));
    border: 1px solid var(--theme-border-color-light, rgba(0,0,0,0.06));
    border-radius: 4px;
    margin-top: 1em;
    padding: 0.5em;
}

.catlinks li {
    border-left: 1px solid var(--theme-border-color-light, rgba(0,0,0,0.06));
}

/* ---- Message boxes (mw-message-box, warning, error) ---- */
.mw-message-box {
    background: var(--theme-notice-blue-background, #E3F2FD);
    border: 1px solid var(--theme-notice-blue-border, #90CAF9);
    color: var(--theme-body-text, #1A1A1A);
    border-radius: 4px;
    padding: 0.8em 1em;
    margin-bottom: 1em;
}

.mw-message-box-error {
    background: var(--theme-notice-red-background, #FFEBEE);
    border-color: var(--theme-notice-red-border, #EF9A9A);
    color: var(--theme-notice-red-text, #C62828);
}

.mw-message-box-warning {
    background: var(--theme-notice-yellow-background, #FFF8E1);
    border-color: var(--theme-notice-yellow-border, #FFE082);
    color: var(--theme-body-text, #1A1A1A);
}

.mw-message-box-success {
    background: var(--theme-notice-green-background, #E8F5E9);
    border-color: var(--theme-notice-green-border, #A5D6A7);
}

/* ---- Diff colours ---- */
.diff-addedline {
    background: var(--theme-diff-added-bg, #E6FFE6);
    color: var(--theme-diff-added-text, #001700);
}

.diff-deletedline {
    background: var(--theme-diff-removed-bg, #FFE6E6);
    color: var(--theme-diff-removed-text, #1F0000);
}

.diff-context {
    background: transparent;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--theme-scrollbar-track, rgba(0,0,0,0.05));
}

::-webkit-scrollbar-thumb {
    background: var(--theme-scrollbar-thumb, rgba(0,0,0,0.2));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--theme-scrollbar-thumb-hover, rgba(0,0,0,0.3));
}

/* ---- Utility classes ---- */
.text-muted {
    color: var(--theme-body-text-muted, #5A5A5A);
}