MediaWiki:Common.css: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* | /* ==================================================== | ||
WIKI GLOBAL CSS - VECTOR 2022 | |||
==================================================== */ | |||
@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. HIDDEN ELEMENTS (READ-ONLY CLEANUP) | |||
==================================================== */ | |||
/* Hide universal UI clutter */ | |||
#footer-places, | #footer-places, | ||
#footer-icons, | #footer-icons, | ||
.mw-footer-container | .mw-footer-container, | ||
#mw-sidebar-button, | #mw-sidebar-button, | ||
#vector-main-menu-dropdown { | #vector-main-menu-dropdown, | ||
.vector-pinnable-header-toggle-button.vector-pinnable-header-unpin-button, | |||
.vector-pinnable-header-pinned.vector-toc-pinnable-header.vector-pinnable-header, | |||
.cdx-menu-item--search-for, | |||
.cdx-search-input__end-button, | |||
#searchButton { | |||
display: none !important; | display: none !important; | ||
} | } | ||
/* | /* Hide navigation/editing UI for logged-out users ONLY */ | ||
body.not-logged-in #p-personal, | body.not-logged-in #p-personal, | ||
body.not-logged-in .vector-user-links, | body.not-logged-in .vector-user-links, | ||
body.not-logged-in #p-vector-user-menu-overflow, | |||
body.not-logged-in #pt-login, | body.not-logged-in #pt-login, | ||
body.not-logged-in #pt-login-2 | body.not-logged-in #pt-login-2, | ||
body.not-logged-in .user-links-collapsible-item, | |||
body.not-logged-in .vector-page-toolbar, | body.not-logged-in .vector-page-toolbar, | ||
body.not-logged-in #p-namespaces, | body.not-logged-in #p-namespaces, | ||
| Line 34: | Line 38: | ||
} | } | ||
/* Hide "Watch this page" | /* Hide "Watch this page" checkboxes in all edit forms */ | ||
.mw-widget-checkDef-watchthis, | .mw-widget-checkDef-watchthis, | ||
.page-mw-watchthis, | .page-mw-watchthis, | ||
.mw-editWatchlist, | |||
#wpWatchthis, | #wpWatchthis, | ||
label[for="wpWatchthis"], | label[for="wpWatchthis"], | ||
| Line 44: | Line 49: | ||
} | } | ||
/* 2. | |||
/* ==================================================== | |||
2. TYPOGRAPHY & LOGO (DEFAULT/LIGHT) | |||
==================================================== */ | |||
.mw-logo-wordmark, | |||
.mw-logo-wordmark * { | |||
color: var(--color-base, #000000) !important; | |||
fill: var(--color-base, #000000) !important; /* Required if wordmark is an SVG */ | |||
font-family: "Mountains of Christmas", serif !important; | |||
font-weight: 700 !important; | |||
} | } | ||
/* | |||
/* ==================================================== | |||
3. LAYOUT & SPACING | |||
==================================================== */ | |||
.mw-body-header { | .mw-body-header { | ||
border-bottom: none !important; | border-bottom: none !important; | ||
| Line 59: | Line 72: | ||
} | } | ||
/* | /* Table of Contents Alignment */ | ||
ul#mw-panel-toc-list.vector-toc-contents { | ul#mw-panel-toc-list.vector-toc-contents { | ||
margin-left: 6px !important; | margin-left: 6px !important; | ||
} | } | ||
#vector-toc, | #vector-toc, | ||
.vector-toc { | .vector-toc { | ||
| Line 83: | Line 81: | ||
} | } | ||
/* | /* ==================================================== | ||
4. INFOBOXES & IMAGES | |||
==================================================== */ | |||
.infobox img, | |||
.portable-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; | |||
} | } | ||
/* Force PortableInfobox to inherit skin colors gracefully */ | |||
.portable-infobox { | |||
background-color: var(--background-color-interactive-subtle, #f8f9fa) !important; | |||
color: var(--color-base, #202122) !important; | |||
border: 1px solid var(--border-color-base, #a2a9b1) !important; | |||
} | } | ||
.portable-infobox .pi-secondary-background { | |||
background-color: var(--background-color-base, #ffffff) !important; | |||
.infobox | |||
} | } | ||
.portable-infobox .pi-secondary-font { | |||
color: var(--color-base, #202122) !important; | |||
. | |||
} | } | ||
/* | /* ==================================================== | ||
5. SEARCH BAR (MINIMALIST MATERIAL) | |||
==================================================== */ | |||
.cdx-search-input { | .cdx-search-input { | ||
border-radius: 8px !important; | border-radius: 8px !important; | ||
| Line 138: | Line 118: | ||
} | } | ||
/* Focus State | /* Focus State */ | ||
.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; | ||
} | } | ||
/* | /* Dropdown Menu */ | ||
.cdx-menu { | .cdx-menu { | ||
border-radius: 8px !important; | border-radius: 8px !important; | ||
| Line 154: | Line 134: | ||
background-color: #ffffff !important; | background-color: #ffffff !important; | ||
overflow: hidden !important; | overflow: hidden !important; | ||
padding: 0 !important; | padding: 0 !important; | ||
} | } | ||
/* | /* Hover/Focus Item */ | ||
.cdx-menu-item:hover, .cdx-menu-item[aria-selected="true"] { | .cdx-menu-item:hover, | ||
.cdx-menu-item[aria-selected="true"] { | |||
background-color: #eeeeee !important; | background-color: #eeeeee !important; | ||
} | } | ||
/* | /* Fix text shifting and inner borders */ | ||
.cdx-text-input, | .cdx-text-input, | ||
.cdx-text-input:focus-within, | .cdx-text-input:focus-within, | ||
| Line 172: | Line 152: | ||
background: transparent !important; | background: transparent !important; | ||
} | } | ||
.vector-typeahead-search-container { | .vector-typeahead-search-container { | ||
max-width: none !important; | max-width: none !important; | ||
| Line 179: | Line 157: | ||
transform: none !important; | transform: none !important; | ||
} | } | ||
.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; | padding-right: 32px !important; | ||
transition: none !important; | transition: none !important; | ||
} | } | ||
/* ==================================================== | /* ==================================================== | ||
6. THEME OVERRIDES (LIGHT & DARK MODE) | |||
==================================================== */ | ==================================================== */ | ||
/* --- Explicit Light Theme --- */ | |||
html.skin-theme-clientpref-day, | html.skin-theme-clientpref-day, | ||
html.skin-theme-clientpref-day body, | html.skin-theme-clientpref-day body, | ||
| Line 216: | Line 187: | ||
} | } | ||
/* | /* --- Explicit Dark Theme --- */ | ||
html.skin-theme-clientpref-night, | html.skin-theme-clientpref-night, | ||
html.skin-theme-clientpref-night body, | html.skin-theme-clientpref-night body, | ||
| Line 226: | Line 195: | ||
} | } | ||
html.skin-theme-clientpref-night .mw-logo-wordmark, | |||
html.skin-theme-clientpref-night .mw-logo-wordmark * { | |||
html.skin-theme-clientpref-night .mw-logo-wordmark { | |||
color: #ffffff !important; | color: #ffffff !important; | ||
fill: #ffffff !important; | |||
} | } | ||
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, | ||
| Line 260: | Line 213: | ||
} | } | ||
html.skin-theme-clientpref-night .cdx-menu-item:hover, | |||
html.skin-theme-clientpref-night .cdx-menu-item[aria-selected="true"] { | |||
background-color: #333639 !important; | |||
} | |||
/* Legacy fix for Portable Infobox in explicit dark mode */ | |||
html.skin-theme-clientpref-night .portable-infobox { | |||
background-color: #181d23 !important; | |||
color: #ffffff !important; | |||
border-color: #272d35 !important; | |||
} | |||
html.skin-theme-clientpref-night .portable-infobox .pi-secondary-background { | |||
background-color: #101418 !important; | |||
} | |||
html.skin-theme-clientpref-night .portable-infobox .pi-secondary-font { | |||
color: #e8e8e8 !important; | |||
} | |||
/* --- OS Automatic Dark Theme --- */ | |||
@media (prefers-color-scheme: dark) { | @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; | |||
fill: #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, | ||
| Line 268: | Line 254: | ||
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; | |||
} | |||
/* Legacy fix for Portable Infobox in OS dark mode */ | |||
html.skin-theme-clientpref-os .portable-infobox { | |||
html.skin-theme-clientpref- | |||
html.skin-theme-clientpref- | |||
} | |||
/* | |||
html.skin-theme-clientpref-os | |||
background-color: #181d23 !important; | background-color: #181d23 !important; | ||
color: # | color: #ffffff !important; | ||
border: | border-color: #272d35 !important; | ||
} | |||
html.skin-theme-clientpref-os .portable-infobox .pi-secondary-background { | |||
background-color: #101418 !important; | |||
} | } | ||
html.skin-theme-clientpref-os .portable-infobox .pi-secondary-font { | |||
html.skin-theme-clientpref-os . | color: #e8e8e8 !important; | ||
color: # | |||
} | } | ||
} | } | ||
Revision as of 18:54, 10 September 2026
/* ====================================================
WIKI GLOBAL CSS - VECTOR 2022
==================================================== */
@import url('https://fonts.googleapis.com/css2?family=Mountains+of+Christmas:wght@400;700&display=swap');
/* ====================================================
1. HIDDEN ELEMENTS (READ-ONLY CLEANUP)
==================================================== */
/* Hide universal UI clutter */
#footer-places,
#footer-icons,
.mw-footer-container,
#mw-sidebar-button,
#vector-main-menu-dropdown,
.vector-pinnable-header-toggle-button.vector-pinnable-header-unpin-button,
.vector-pinnable-header-pinned.vector-toc-pinnable-header.vector-pinnable-header,
.cdx-menu-item--search-for,
.cdx-search-input__end-button,
#searchButton {
display: none !important;
}
/* Hide navigation/editing UI for logged-out users ONLY */
body.not-logged-in #p-personal,
body.not-logged-in .vector-user-links,
body.not-logged-in #p-vector-user-menu-overflow,
body.not-logged-in #pt-login,
body.not-logged-in #pt-login-2,
body.not-logged-in .user-links-collapsible-item,
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;
}
/* Hide "Watch this page" checkboxes in all edit forms */
.mw-widget-checkDef-watchthis,
.page-mw-watchthis,
.mw-editWatchlist,
#wpWatchthis,
label[for="wpWatchthis"],
.oo-ui-fieldLayout:has(#wpWatchthis),
.oo-ui-fieldLayout:has([name="wpWatchthis"]) {
display: none !important;
}
/* ====================================================
2. TYPOGRAPHY & LOGO (DEFAULT/LIGHT)
==================================================== */
.mw-logo-wordmark,
.mw-logo-wordmark * {
color: var(--color-base, #000000) !important;
fill: var(--color-base, #000000) !important; /* Required if wordmark is an SVG */
font-family: "Mountains of Christmas", serif !important;
font-weight: 700 !important;
}
/* ====================================================
3. LAYOUT & SPACING
==================================================== */
.mw-body-header {
border-bottom: none !important;
margin-bottom: 0 !important;
}
/* Table of Contents Alignment */
ul#mw-panel-toc-list.vector-toc-contents {
margin-left: 6px !important;
}
#vector-toc,
.vector-toc {
margin-top: 0 !important;
}
/* ====================================================
4. INFOBOXES & IMAGES
==================================================== */
.infobox img,
.portable-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;
}
/* Force PortableInfobox to inherit skin colors gracefully */
.portable-infobox {
background-color: var(--background-color-interactive-subtle, #f8f9fa) !important;
color: var(--color-base, #202122) !important;
border: 1px solid var(--border-color-base, #a2a9b1) !important;
}
.portable-infobox .pi-secondary-background {
background-color: var(--background-color-base, #ffffff) !important;
}
.portable-infobox .pi-secondary-font {
color: var(--color-base, #202122) !important;
}
/* ====================================================
5. SEARCH BAR (MINIMALIST MATERIAL)
==================================================== */
.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;
}
/* Focus State */
.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;
}
/* 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;
}
/* Hover/Focus Item */
.cdx-menu-item:hover,
.cdx-menu-item[aria-selected="true"] {
background-color: #eeeeee !important;
}
/* Fix text shifting and inner borders */
.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;
}
.vector-typeahead-search-container {
max-width: none !important;
margin: 0 !important;
transform: none !important;
}
.cdx-text-input__input {
background: transparent !important;
border: none !important;
box-shadow: none !important;
padding-right: 32px !important;
transition: none !important;
}
/* ====================================================
6. THEME OVERRIDES (LIGHT & DARK MODE)
==================================================== */
/* --- Explicit Light Theme --- */
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;
}
}
/* --- Explicit Dark Theme --- */
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;
fill: #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;
}
/* Legacy fix for Portable Infobox in explicit dark mode */
html.skin-theme-clientpref-night .portable-infobox {
background-color: #181d23 !important;
color: #ffffff !important;
border-color: #272d35 !important;
}
html.skin-theme-clientpref-night .portable-infobox .pi-secondary-background {
background-color: #101418 !important;
}
html.skin-theme-clientpref-night .portable-infobox .pi-secondary-font {
color: #e8e8e8 !important;
}
/* --- OS Automatic Dark Theme --- */
@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;
fill: #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;
}
/* Legacy fix for Portable Infobox in OS dark mode */
html.skin-theme-clientpref-os .portable-infobox {
background-color: #181d23 !important;
color: #ffffff !important;
border-color: #272d35 !important;
}
html.skin-theme-clientpref-os .portable-infobox .pi-secondary-background {
background-color: #101418 !important;
}
html.skin-theme-clientpref-os .portable-infobox .pi-secondary-font {
color: #e8e8e8 !important;
}
}