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

MediaWiki interface page
Revision as of 11:52, 11 March 2026 by Menhir wiki admin (talk | contribs) (Add WordPress header/footer positioning and isolation CSS)

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.
/*
 * Menhirs Fate Wiki - Functional CSS only
 * Default Citizen theme colours preserved — no colour overrides
 */

/* ─── IMAGE SIZING — constrain external images ───────────────────────── */
.mw-body-content img:not(.mw-file-element):not([class*="citizen"]):not([class*="oo-ui"]) {
    max-width: 350px;
    max-height: 450px;
    height: auto;
    width: auto;
    object-fit: cover;
    border-radius: 6px;
    float: right;
    margin: 0 0 1em 1.5em;
}

@media (max-width: 768px) {
    .mw-body-content img:not(.mw-file-element):not([class*="citizen"]):not([class*="oo-ui"]) {
        float: none;
        display: block;
        margin: 1em auto !important;
        max-width: 100%;
    }
}

/* ─── NATION IMAGE GRID ──────────────────────────────────────── */
.nation-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px;
    margin: 1.5em 0;
    max-width: 900px;
    clear: both;
}
.nation-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 2/3;
    background-color: var(--color-surface-2, #1c1c1f);
    background-size: cover;
    background-position: center top;
    transition: transform 0.3s ease;
}
.nation-grid-item:hover {
    transform: scale(1.03);
}
.nation-grid-item p {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
}
.nation-grid-item a {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    width: 100%;
    height: 100%;
    text-decoration: none !important;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(transparent 50%, rgba(0,0,0,0.7)) !important;
    padding: 0 0 15px 0;
}
.nation-grid-item .nation-label {
    color: #f6f6f6 !important;
    font-size: 1.1rem;
    font-weight: 600;
    font-style: italic;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.nation-grid-item a:hover .nation-label {
    color: var(--color-primary, #36c) !important;
}

@media (max-width: 600px) {
    .nation-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ─── NATION GRID BACKGROUND IMAGES ──────────────────────────── */
.nation-avereaux { background-image: url('https://www.menhirsfate.com/wp-content/uploads/2024/11/DSC02283-684x1024.jpg'); }
.nation-wonder { background-image: url('https://www.menhirsfate.com/wp-content/uploads/2024/11/DSC02033-684x1024.jpg'); }
.nation-valdraeth { background-image: url('https://www.menhirsfate.com/wp-content/uploads/2024/11/DSC02067-684x1024.jpg'); }
.nation-portavas { background-image: url('https://www.menhirsfate.com/wp-content/uploads/2024/11/MF_13_IntroRules-684x1024.jpg'); }
.nation-hammerstadt { background-image: url('https://www.menhirsfate.com/wp-content/uploads/2024/11/MF_11_DamageGameEffects-681x1024.jpg'); }
.nation-urdrevan { background-image: url('https://www.menhirsfate.com/wp-content/uploads/2024/10/DSC03197-684x1024.jpg'); }
.nation-kairos { background-image: url('https://www.menhirsfate.com/wp-content/uploads/2024/10/DSC02402-684x1024.jpg'); }
.nation-syradonia { background-image: url('https://www.menhirsfate.com/wp-content/uploads/2024/10/DSC02552-684x1024.jpg'); }
.nation-morvalis { background-image: url('https://www.menhirsfate.com/wp-content/uploads/2024/10/DSC02441-684x1024.jpg'); }

/* ─── WORDPRESS HEADER / FOOTER INTEGRATION ────────────────────────────────── */

/* Outer wrapper — sits above all Citizen UI */
#mf-wp-header {
    position: relative;
    z-index: 200;
    width: 100%;
    display: block;
}

/* Citizen's sticky header sits below the WP nav */
#citizen-page-header,
.citizen-header {
    z-index: 100;
}

/* Ensure Astra dropdowns appear over wiki content */
#mf-wp-header .sub-menu,
#mf-wp-header .submenu-wrap,
#mf-wp-header .ast-nav-menu .sub-menu {
    z-index: 9999 !important;
}

/* Astra sets 100vw width on container — keep within wiki viewport */
#mf-wp-header .ast-container,
#mf-wp-header .site-header-primary-section-1,
#mf-wp-header .site-header-section {
    max-width: 100% !important;
}

/* Footer wrapper */
#mf-wp-footer {
    position: relative;
    z-index: 10;
    width: 100%;
    display: block;
}

/* Restore Citizen link colour inside wiki content area
   (counteracts any Astra global a{color} that leaked through) */
.mw-body-content a:not(.new) {
    color: var(--color-link) !important;
}
.mw-body-content a:hover {
    color: var(--color-link-active) !important;
}