Jump to content

MediaWiki:Common.css: Difference between revisions

From Fedoverse Wiki, the free encyclopedia
No edit summary
No edit summary
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* CSS placed here will be applied to all skins */
 
/* --- HIDE ALL CLUTTER FOR READ-ONLY WIKI --- */
 


/* --- 0. FONTS & IMPORTS --- */
@import url('https://fonts.googleapis.com/css2?family=Mountains+of+Christmas:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Mountains+of+Christmas:wght@400;700&display=swap');


/* --- 1. UI CLEANUP & READ-ONLY HIDING --- */


/* Hide default MediaWiki footers (privacy, disclaimers, powered by) */
/* Footers: Privacy, disclaimers, powered by */
 
#footer-places,
#footer-places,
#footer-icons,
#footer-icons,
.mw-footer-container {
.mw-footer-container {
     display: none !important;
     display: none !important;
}
}


 
/* Sidebar & Navigation controls */
/* 1. Hide the Hamburger Menu button (top left) */
 
#mw-sidebar-button,
#mw-sidebar-button,
#vector-main-menu-dropdown {
#vector-main-menu-dropdown {
    display: none !important;
}
/* 2. Hide the Log in button / user section (top right) */
body.not-logged-in #p-personal,
body.not-logged-in .vector-user-links,
body.not-logged-in #pt-login,
body.not-logged-in #pt-login-2 {
    display: none !important;
}
/* 3. Hide the page category tabs (Main Page | Discussion) & action tabs (Read | View source | View history | Tools) */
body.not-logged-in .vector-page-toolbar,
body.not-logged-in #p-namespaces,
body.not-logged-in #p-views,
body.not-logged-in #p-cactions,
body.not-logged-in .mw-article-toolbar {
     display: none !important;
     display: none !important;
}
}


 
/* User account / Log in links */
/* Hide "Watch this page" checkbox in VisualEditor & standard edit forms */
#p-personal,
 
.mw-widget-checkDef-watchthis,
 
.page-mw-watchthis,
 
#wpWatchthis,
 
label[for="wpWatchthis"],
 
.oo-ui-fieldLayout:has(#wpWatchthis),
 
.oo-ui-fieldLayout:has([name="wpWatchthis"]) {
 
    display: none !important;
 
}
 
 
/* 2. Hide Log in Button (Top Right) */
 
#p-vector-user-menu-overflow,
 
#pt-login,
#pt-login,
#pt-login-2,
#pt-login-2,
 
#p-vector-user-menu-overflow,
.vector-user-links,
.vector-user-links,
.user-links-collapsible-item {
.user-links-collapsible-item {
    display: none !important;
}


/* Page tabs & toolbars (Namespaces, views, actions) */
.vector-page-toolbar,
.mw-article-toolbar,
#p-namespaces,
#p-views,
#p-cactions,
#vector-page-tools-dropdown {
     display: none !important;
     display: none !important;
}
}


 
/* Spacing left behind by removed tabs */
/* Optional: Clean up the top line spacing left behind by the tabs */
 
.mw-body-header {
.mw-body-header {
     border-bottom: none !important;
     border-bottom: none !important;
     margin-bottom: 0 !important;
     margin-bottom: 0 !important;
}
}


 
/* Watch page elements (Forms & VisualEditor) */
/* Hide "Watch this page" checkbox and label in edit forms */
#wpWatchthis,
 
.page-mw-watchthis,
.mw-editWatchlist,
.mw-editWatchlist,
 
.mw-widget-checkDef-watchthis,
.page-mw-watchthis,
 
label[for="wpWatchthis"],
label[for="wpWatchthis"],
 
.oo-ui-fieldLayout:has(#wpWatchthis),
#wpWatchthis {
.oo-ui-fieldLayout:has([name="wpWatchthis"]) {
 
     display: none !important;
     display: none !important;
}
}


/* --- 2. TABLE OF CONTENTS --- */


/* Align Table of Contents list with the logo above */
#vector-toc,
.vector-toc {
    margin-top: 0 !important;
}


ul#mw-panel-toc-list.vector-toc-contents {
ul#mw-panel-toc-list.vector-toc-contents {
 
     margin-left: 6px !important;
     margin-left: 6px !important;  
 
}
}


 
/* Hide TOC header & unpin button */
/* Hide the pinned table of contents header */
.vector-pinnable-header-pinned.vector-toc-pinnable-header.vector-pinnable-header,
 
.vector-pinnable-header-toggle-button.vector-pinnable-header-unpin-button {
.vector-pinnable-header-pinned.vector-toc-pinnable-header.vector-pinnable-header {
 
     display: none !important;
     display: none !important;
}
/* Remove the empty yellow margin space above the Table of Contents */
#vector-toc,
.vector-toc {
    margin-top: 0 !important;
}
}


 
/* --- 3. BRANDING & MEDIA --- */
/* Default (light mode) logo text */


.mw-logo-wordmark,
.mw-logo-wordmark,
.mw-logo-wordmark * {
.mw-logo-wordmark * {
     color: #000000 !important;
     color: #000000 !important;
     font-family: "Mountains of Christmas", serif !important;
     font-family: "Mountains of Christmas", serif !important;
     font-weight: 700 !important;
     font-weight: 700 !important;
}
/* Dark mode & Automatic (OS dark) logo text */
html.skin-theme-clientpref-night .mw-logo-wordmark,
html.skin-theme-clientpref-night .mw-logo-wordmark * {
    color: #ffffff !important;
}
@media (prefers-color-scheme: dark) {
    html.skin-theme-clientpref-os .mw-logo-wordmark,
    html.skin-theme-clientpref-os .mw-logo-wordmark * {
        color: #ffffff !important;
    }
}
}


 
/* Modern infobox images */
/* Modern styling for all images inside infoboxes */
 
.infobox img {
.infobox img {
 
     border-radius: 8px;
     border-radius: 8px;       /* Rounds image corners */
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
 
     transition: transform 0.2s ease, box-shadow 0.2s ease;
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Adds a subtle depth shadow */
 
     transition: transform 0.2s ease, box-shadow 0.2s ease; /* Smooth hover transition */
 
}
}


/* --- 4. MATERIAL FLOATING SEARCH BAR --- */


/* --- HIDE INSPECTED UNPIN/HIDE BUTTON --- */
/* Hide search buttons & dropdown filler */
 
#searchButton,
.vector-pinnable-header-toggle-button.vector-pinnable-header-unpin-button {
 
    display: none !important;
 
}
 
 
 
/* --- MINIMALIST MATERIAL (FLOATING STYLE) --- */
 
 
/* 1. Hide the Search button */
 
.cdx-search-input__end-button,
.cdx-search-input__end-button,
 
.cdx-menu-item--search-for {
#searchButton {
 
     display: none !important;
     display: none !important;
}
}


 
/* Search container & layout stability */
/* 2. Hide "Search for pages containing..." in the dropdown */
.vector-typeahead-search-container {
 
    max-width: none !important;
.cdx-menu-item--search-for {
    margin: 0 !important;
 
     transform: none !important;
     display: none !important;
 
}
}
/* 3. Search Bar Container */


.cdx-search-input {
.cdx-search-input {
     border-radius: 8px !important;
     border-radius: 8px !important;
     border: 1px solid transparent !important;
     border: 1px solid transparent !important;
     background-color: #f1f3f4 !important;
     background-color: #f1f3f4 !important;
     transition: background-color 0.2s, box-shadow 0.2s, border 0.2s;
     transition: background-color 0.2s, box-shadow 0.2s, border 0.2s;
}
}
/* Focus State: Becomes white, pops out, and STAYS rounded */


.cdx-search-input:focus-within {
.cdx-search-input:focus-within {
     background-color: #ffffff !important;
     background-color: #ffffff !important;
     box-shadow: 0 4px 6px rgba(32, 33, 36, 0.2) !important;
     box-shadow: 0 4px 6px rgba(32, 33, 36, 0.2) !important;
     border: 1px solid #dfe1e5 !important;
     border: 1px solid #dfe1e5 !important;
 
     border-radius: 8px !important;
     border-radius: 8px !important; /* Forces all corners to stay rounded */
 
}
 
 
/* 4. Search Dropdown Menu */
 
.cdx-menu {
 
    border-radius: 8px !important;
 
    box-shadow: 0 6px 12px rgba(32, 33, 36, 0.15) !important;
 
    border: 1px solid #dfe1e5 !important;
 
    margin-top: 8px !important;
 
    background-color: #ffffff !important;
 
    overflow: hidden !important;
 
    padding: 0 !important; /* REMOVES THE WHITE GAP */
 
}
 
 
/* Highlighted Suggestion */
 
.cdx-menu-item:hover, .cdx-menu-item[aria-selected="true"] {
 
    background-color: #eeeeee !important;
 
}
}


 
/* Search inputs */
/* 5. Fix alignment shifting on focus */
 
/* Strip default Codex inner borders/shadows that cause the 1px jump */
 
.cdx-text-input,
.cdx-text-input,
.cdx-text-input:focus-within,
.cdx-text-input:focus-within,
.cdx-text-input.cdx-text-input--status-default {
.cdx-text-input.cdx-text-input--status-default {
     border: none !important;
     border: none !important;
     box-shadow: none !important;
     box-shadow: none !important;
     outline: none !important;
     outline: none !important;
     background: transparent !important;
     background: transparent !important;
}
}
/* Stop MediaWiki from dynamically resizing the search container width */
.vector-typeahead-search-container {
    max-width: none !important;
    margin: 0 !important;
    transform: none !important;
}
/* 6. Fix text shifting when typing */
/* Lock internal padding & input styling so text never jumps */


.cdx-text-input__input {
.cdx-text-input__input {
     background: transparent !important;
     background: transparent !important;
     border: none !important;
     border: none !important;
     box-shadow: none !important;
     box-shadow: none !important;
    padding-right: 32px !important;
    transition: none !important;
}


     padding-right: 32px !important; /* Permanent space for clear button */
/* Search dropdown results */
 
.cdx-menu {
     transition: none !important; /* Disables padding shift animations */
     border-radius: 8px !important;
 
    box-shadow: 0 6px 12px rgba(32, 33, 36, 0.15) !important;
    border: 1px solid #dfe1e5 !important;
    margin-top: 8px !important;
    background-color: #ffffff !important;
     overflow: hidden !important;
    padding: 0 !important;
}
}


 
.cdx-menu-item:hover,
 
.cdx-menu-item[aria-selected="true"] {
/* Hover state for dropdown items in dark mode */
     background-color: #eeeeee !important;
 
html.skin-theme-clientpref-night .cdx-menu-item:hover,  
 
html.skin-theme-clientpref-night .cdx-menu-item[aria-selected="true"] {
 
     background-color: #333639 !important;
 
}
}


/* --- 5. THEME OVERRIDES --- */


/* ====================================================
/* Light Theme (Clientpref Day + OS Light) */
 
  1. LIGHT THEME (Explicit Light or OS Light)
 
  ==================================================== */
 
html.skin-theme-clientpref-day,
html.skin-theme-clientpref-day,
html.skin-theme-clientpref-day body,
html.skin-theme-clientpref-day body,
html.skin-theme-clientpref-day .mw-page-container,
html.skin-theme-clientpref-day .mw-page-container,
html.skin-theme-clientpref-day .mw-header {
html.skin-theme-clientpref-day .mw-header {
     background-color: #ffffff !important;
     background-color: #ffffff !important;
}
}


@media (prefers-color-scheme: light) {
@media (prefers-color-scheme: light) {
     html.skin-theme-clientpref-os,
     html.skin-theme-clientpref-os,
     html.skin-theme-clientpref-os body,
     html.skin-theme-clientpref-os body,
     html.skin-theme-clientpref-os .mw-page-container,
     html.skin-theme-clientpref-os .mw-page-container,
     html.skin-theme-clientpref-os .mw-header {
     html.skin-theme-clientpref-os .mw-header {
         background-color: #ffffff !important;
         background-color: #ffffff !important;
     }
     }
}
}


 
/* Dark Theme (Clientpref Night) */
/* ====================================================
 
  2. DARK THEME (Explicit Dark or OS Dark)
 
  ==================================================== */
 
html.skin-theme-clientpref-night,
html.skin-theme-clientpref-night,
html.skin-theme-clientpref-night body,
html.skin-theme-clientpref-night body,
html.skin-theme-clientpref-night .mw-page-container,
html.skin-theme-clientpref-night .mw-page-container,
html.skin-theme-clientpref-night .mw-header {
html.skin-theme-clientpref-night .mw-header {
     background-color: #101418 !important;
     background-color: #101418 !important;
}
}


 
html.skin-theme-clientpref-night .mw-logo-wordmark,
@media (prefers-color-scheme: dark) {
html.skin-theme-clientpref-night .mw-logo-wordmark * {
 
    html.skin-theme-clientpref-os,
 
    html.skin-theme-clientpref-os body,
 
    html.skin-theme-clientpref-os .mw-page-container,
 
    html.skin-theme-clientpref-os .mw-header {
 
        background-color: #101418 !important;
 
    }
 
}
 
 
/* Logo wordmark text white in dark mode & automatic dark */
 
html.skin-theme-clientpref-night .mw-logo-wordmark {
 
     color: #ffffff !important;
     color: #ffffff !important;
}
}
@media (prefers-color-scheme: dark) {
    html.skin-theme-clientpref-os .mw-logo-wordmark {
        color: #ffffff !important;
    }
}
/* ====================================================
  3. SEARCH BAR DARK OVERRIDES (Night + OS Dark)
  ==================================================== */


html.skin-theme-clientpref-night .cdx-search-input,
html.skin-theme-clientpref-night .cdx-search-input,
html.skin-theme-clientpref-night .cdx-search-input:focus-within,
html.skin-theme-clientpref-night .cdx-search-input:focus-within,
html.skin-theme-clientpref-night .cdx-menu {
html.skin-theme-clientpref-night .cdx-menu {
     background-color: #181d23 !important;
     background-color: #181d23 !important;
     border-color: #272d35 !important;
     border-color: #272d35 !important;
     box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4) !important;
     box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4) !important;
}
}


html.skin-theme-clientpref-night .cdx-text-input__input {
html.skin-theme-clientpref-night .cdx-text-input__input {
     color: #f8f9fa !important;
     color: #f8f9fa !important;
}


html.skin-theme-clientpref-night .cdx-menu-item:hover,
html.skin-theme-clientpref-night .cdx-menu-item[aria-selected="true"] {
    background-color: #333639 !important;
}
}


/* Dark Theme (OS Match - Clientpref OS) */
@media (prefers-color-scheme: dark) {
    html.skin-theme-clientpref-os,
    html.skin-theme-clientpref-os body,
    html.skin-theme-clientpref-os .mw-page-container,
    html.skin-theme-clientpref-os .mw-header {
        background-color: #101418 !important;
    }


@media (prefers-color-scheme: dark) {
    html.skin-theme-clientpref-os .mw-logo-wordmark,
    html.skin-theme-clientpref-os .mw-logo-wordmark * {
        color: #ffffff !important;
    }


     html.skin-theme-clientpref-os .cdx-search-input,
     html.skin-theme-clientpref-os .cdx-search-input,
     html.skin-theme-clientpref-os .cdx-search-input:focus-within,
     html.skin-theme-clientpref-os .cdx-search-input:focus-within,
     html.skin-theme-clientpref-os .cdx-menu {
     html.skin-theme-clientpref-os .cdx-menu {
         background-color: #181d23 !important;
         background-color: #181d23 !important;
         border-color: #272d35 !important;
         border-color: #272d35 !important;
         box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4) !important;
         box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4) !important;
     }
     }


     html.skin-theme-clientpref-os .cdx-text-input__input {
     html.skin-theme-clientpref-os .cdx-text-input__input {
         color: #f8f9fa !important;
         color: #f8f9fa !important;
    }


    html.skin-theme-clientpref-os .cdx-menu-item:hover,
    html.skin-theme-clientpref-os .cdx-menu-item[aria-selected="true"] {
        background-color: #333639 !important;
     }
     }
}
/* 1. Hide the Navigation Toolbar (Main Page | Discussion | Read | View source | View history | Tools) */
.vector-page-toolbar,
#p-namespaces,
#p-views,
#p-cactions,
#vector-page-tools-dropdown {
    display: none !important;
}
}

Revision as of 18:59, 10 September 2026

/* CSS placed here will be applied to all skins */

/* --- 0. FONTS & IMPORTS --- */
@import url('https://fonts.googleapis.com/css2?family=Mountains+of+Christmas:wght@400;700&display=swap');

/* --- 1. UI CLEANUP & READ-ONLY HIDING --- */

/* Footers: Privacy, disclaimers, powered by */
#footer-places,
#footer-icons,
.mw-footer-container {
    display: none !important;
}

/* Sidebar & Navigation controls */
#mw-sidebar-button,
#vector-main-menu-dropdown {
    display: none !important;
}

/* User account / Log in links */
#p-personal,
#pt-login,
#pt-login-2,
#p-vector-user-menu-overflow,
.vector-user-links,
.user-links-collapsible-item {
    display: none !important;
}

/* Page tabs & toolbars (Namespaces, views, actions) */
.vector-page-toolbar,
.mw-article-toolbar,
#p-namespaces,
#p-views,
#p-cactions,
#vector-page-tools-dropdown {
    display: none !important;
}

/* Spacing left behind by removed tabs */
.mw-body-header {
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

/* Watch page elements (Forms & VisualEditor) */
#wpWatchthis,
.page-mw-watchthis,
.mw-editWatchlist,
.mw-widget-checkDef-watchthis,
label[for="wpWatchthis"],
.oo-ui-fieldLayout:has(#wpWatchthis),
.oo-ui-fieldLayout:has([name="wpWatchthis"]) {
    display: none !important;
}

/* --- 2. TABLE OF CONTENTS --- */

#vector-toc,
.vector-toc {
    margin-top: 0 !important;
}

ul#mw-panel-toc-list.vector-toc-contents {
    margin-left: 6px !important;
}

/* Hide TOC header & unpin button */
.vector-pinnable-header-pinned.vector-toc-pinnable-header.vector-pinnable-header,
.vector-pinnable-header-toggle-button.vector-pinnable-header-unpin-button {
    display: none !important;
}

/* --- 3. BRANDING & MEDIA --- */

.mw-logo-wordmark,
.mw-logo-wordmark * {
    color: #000000 !important;
    font-family: "Mountains of Christmas", serif !important;
    font-weight: 700 !important;
}

/* Modern infobox images */
.infobox img {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* --- 4. MATERIAL FLOATING SEARCH BAR --- */

/* Hide search buttons & dropdown filler */
#searchButton,
.cdx-search-input__end-button,
.cdx-menu-item--search-for {
    display: none !important;
}

/* Search container & layout stability */
.vector-typeahead-search-container {
    max-width: none !important;
    margin: 0 !important;
    transform: none !important;
}

.cdx-search-input {
    border-radius: 8px !important;
    border: 1px solid transparent !important;
    background-color: #f1f3f4 !important;
    transition: background-color 0.2s, box-shadow 0.2s, border 0.2s;
}

.cdx-search-input:focus-within {
    background-color: #ffffff !important;
    box-shadow: 0 4px 6px rgba(32, 33, 36, 0.2) !important;
    border: 1px solid #dfe1e5 !important;
    border-radius: 8px !important;
}

/* Search inputs */
.cdx-text-input,
.cdx-text-input:focus-within,
.cdx-text-input.cdx-text-input--status-default {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
}

.cdx-text-input__input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding-right: 32px !important;
    transition: none !important;
}

/* Search dropdown results */
.cdx-menu {
    border-radius: 8px !important;
    box-shadow: 0 6px 12px rgba(32, 33, 36, 0.15) !important;
    border: 1px solid #dfe1e5 !important;
    margin-top: 8px !important;
    background-color: #ffffff !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.cdx-menu-item:hover,
.cdx-menu-item[aria-selected="true"] {
    background-color: #eeeeee !important;
}

/* --- 5. THEME OVERRIDES --- */

/* Light Theme (Clientpref Day + OS Light) */
html.skin-theme-clientpref-day,
html.skin-theme-clientpref-day body,
html.skin-theme-clientpref-day .mw-page-container,
html.skin-theme-clientpref-day .mw-header {
    background-color: #ffffff !important;
}

@media (prefers-color-scheme: light) {
    html.skin-theme-clientpref-os,
    html.skin-theme-clientpref-os body,
    html.skin-theme-clientpref-os .mw-page-container,
    html.skin-theme-clientpref-os .mw-header {
        background-color: #ffffff !important;
    }
}

/* Dark Theme (Clientpref Night) */
html.skin-theme-clientpref-night,
html.skin-theme-clientpref-night body,
html.skin-theme-clientpref-night .mw-page-container,
html.skin-theme-clientpref-night .mw-header {
    background-color: #101418 !important;
}

html.skin-theme-clientpref-night .mw-logo-wordmark,
html.skin-theme-clientpref-night .mw-logo-wordmark * {
    color: #ffffff !important;
}

html.skin-theme-clientpref-night .cdx-search-input,
html.skin-theme-clientpref-night .cdx-search-input:focus-within,
html.skin-theme-clientpref-night .cdx-menu {
    background-color: #181d23 !important;
    border-color: #272d35 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4) !important;
}

html.skin-theme-clientpref-night .cdx-text-input__input {
    color: #f8f9fa !important;
}

html.skin-theme-clientpref-night .cdx-menu-item:hover,
html.skin-theme-clientpref-night .cdx-menu-item[aria-selected="true"] {
    background-color: #333639 !important;
}

/* Dark Theme (OS Match - Clientpref OS) */
@media (prefers-color-scheme: dark) {
    html.skin-theme-clientpref-os,
    html.skin-theme-clientpref-os body,
    html.skin-theme-clientpref-os .mw-page-container,
    html.skin-theme-clientpref-os .mw-header {
        background-color: #101418 !important;
    }

    html.skin-theme-clientpref-os .mw-logo-wordmark,
    html.skin-theme-clientpref-os .mw-logo-wordmark * {
        color: #ffffff !important;
    }

    html.skin-theme-clientpref-os .cdx-search-input,
    html.skin-theme-clientpref-os .cdx-search-input:focus-within,
    html.skin-theme-clientpref-os .cdx-menu {
        background-color: #181d23 !important;
        border-color: #272d35 !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4) !important;
    }

    html.skin-theme-clientpref-os .cdx-text-input__input {
        color: #f8f9fa !important;
    }

    html.skin-theme-clientpref-os .cdx-menu-item:hover,
    html.skin-theme-clientpref-os .cdx-menu-item[aria-selected="true"] {
        background-color: #333639 !important;
    }
}