Jump to content

MediaWiki:Common.css

From DevilutionX Wiki
Revision as of 05:05, 1 December 2025 by KPhoenix (talk | contribs)

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.
/* CSS placed here will be applied to all skins */
/* base navbox look */
.navbox.dxx-navbox {
    border: 1px solid #666;
    margin: 1em 0;
    border-collapse: collapse;
    width: 100%;
    font-size: 90%;
}

/* LIGHT MODE (default) */
.dxx-navbox,
.dxx-navbox-title,
.dxx-navbox-header,
.dxx-navbox-group,
.dxx-navbox-list,
.dxx-navbox-list-main {
    background: #f8f8f8;
    color: #202020;
}

.dxx-navbox-title {
    background: #e2e2e2;
    font-weight: bold;
    text-align: center;
}

.dxx-navbox-header {
    background: #e9f2f9;
    font-weight: bold;
    text-align: center;
}

.dxx-navbox-group {
    background: #eef5fb;
    font-weight: bold;
    text-align: right;
    padding: 0.3em;
    vertical-align: top;
    width: 18%;
}

.dxx-navbox-list {
    padding: 0.3em;
    text-align: left;
}

.dxx-navbox-list-main {
    padding: 0.3em;
    text-align: center;
}

/* DARK MODE OVERRIDES */
/* Adjust the selector to whatever your skin uses for dark mode. 
   Vector 2022 with built-in dark uses body.skin-theme-clientpref-night, 
   others might use .skin-vector-dark, .theme-dark, etc. */

.skin-theme-clientpref-night .dxx-navbox,
.skin-theme-clientpref-night .dxx-navbox-title,
.skin-theme-clientpref-night .dxx-navbox-header,
.skin-theme-clientpref-night .dxx-navbox-group,
.skin-theme-clientpref-night .dxx-navbox-list,
.skin-theme-clientpref-night .dxx-navbox-list-main {
    background: #111;
    color: #eee;
}

.skin-theme-clientpref-night .dxx-navbox-title {
    background: #222;
}

.skin-theme-clientpref-night .dxx-navbox-header {
    background: #191919;
}

.skin-theme-clientpref-night .dxx-navbox-group {
    background: #181818;
}

/* Kill the big gap created by stray <p> and <br> between navboxes */

/* Any paragraph directly after a navbox: no margin */
.mw-parser-output .navbox.dxx-navbox + p {
    margin-top: 0;
    margin-bottom: 0;
}

/* Hide lone <br> inside that paragraph */
.mw-parser-output .navbox.dxx-navbox + p > br {
    display: none;
}

/* And if there is a second paragraph after that, kill its margin too */
.mw-parser-output .navbox.dxx-navbox + p + p {
    margin-top: 0;
    margin-bottom: 0;
}