MediaWiki:Common.css: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 107: | Line 107: | ||
} | } | ||
} | } | ||
/* --- FIX HEADER ALIGNMENT --- */ | /* --- FIX HEADER ALIGNMENT --- */ | ||
.mw-header { | .mw-header { | ||
display: flex !important; | display: flex !important; | ||
justify-content: | justify-content: flex-start !important; | ||
align-items: center !important; | align-items: center !important; | ||
width: 100% !important; | width: 100% !important; | ||
gap: 1.5em !important; | gap: 1.5em !important; | ||
box-sizing: border-box !important; | box-sizing: border-box !important; | ||
padding: 0.5em | |||
/* Centers the header block to match the general text area */ | |||
max-width: 60em !important; | |||
margin: 0 auto !important; | |||
/* NUDGE: Adjust this number to push the logo right until it perfectly hits the 'D' */ | |||
padding-left: 3.5em !important; | |||
padding-top: 0.5em !important; | |||
padding-bottom: 0.5em !important; | |||
padding-right: 0 !important; | |||
} | } | ||
Revision as of 10:59, 28 July 2026
/* CSS placed here will be applied to all skins */
/* --- HIDE ALL CLUTTER FOR READ-ONLY WIKI --- */
/* Hide search/hamburger/vector menus for anonymous visitors */
body.not-logged-in #p-cactions,
body.not-logged-in #p-views,
body.not-logged-in #p-navigation,
body.not-logged-in .mw-article-toolbar,
body.not-logged-in .mw-editsection {
display: none !important;
}
/* Hide Vector 2022 specific hamburger menu & main menu toggles */
body.not-logged-in #vector-main-menu-dropdown,
body.not-logged-in #vector-page-tools-dropdown,
body.not-logged-in .vector-header-end #p-user-menu-overflow {
display: none !important;
}
/* Hide default MediaWiki footers (privacy, disclaimers, powered by) */
#footer-places,
#footer-icons,
.mw-footer-container {
display: none !important;
}
/* 1. Hide the Hamburger Menu button (top left) */
#mw-sidebar-button,
#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;
}
/* Hide "Watch this page" checkbox in VisualEditor & standard edit forms */
.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;
}
/* 1. Hide the Navigation Toolbar (Main Page | Discussion | Read | View source | View history | Tools) */
.vector-page-toolbar,
.mw-table-of-contents-container,
#p-namespaces,
#p-views,
#p-cactions,
#vector-page-tools-dropdown,
.vector-page-titlebar-toc {
display: none !important;
}
/* 2. Hide Log in Button (Top Right) */
#p-vector-user-menu-overflow,
#pt-login,
#pt-login-2,
.vector-user-links,
.user-links-collapsible-item {
display: none !important;
}
/* 3. Hide Hamburger Menu Button (Top Left) */
#mw-sidebar-button,
.vector-main-menu-container {
display: none !important;
}
/* Optional: Clean up the top line spacing left behind by the tabs */
.mw-body-header {
border-bottom: none !important;
margin-bottom: 0 !important;
}
.vector-column-start {
display: none !important;
}
/* Hide "Watch this page" checkbox and label in edit forms */
.mw-editWatchlist,
.page-mw-watchthis,
label[for="wpWatchthis"],
#wpWatchthis {
display: none !important;
}
@media screen {
body {
background-color: #ffffff !important;
}
}
/* --- FIX HEADER ALIGNMENT --- */
.mw-header {
display: flex !important;
justify-content: flex-start !important;
align-items: center !important;
width: 100% !important;
gap: 1.5em !important;
box-sizing: border-box !important;
/* Centers the header block to match the general text area */
max-width: 60em !important;
margin: 0 auto !important;
/* NUDGE: Adjust this number to push the logo right until it perfectly hits the 'D' */
padding-left: 3.5em !important;
padding-top: 0.5em !important;
padding-bottom: 0.5em !important;
padding-right: 0 !important;
}
/* Ensure the logo area doesn't add extra invisible margins */
.vector-header-start {
margin: 0 !important;
padding: 0 !important;
}