MediaWiki:Common.css: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* ========================================================= | /* ========================================================= | ||
TRUE center search (independent of left/right header content) | |||
Vector 2022 | |||
========================================================= */ | ========================================================= */ | ||
/* | /* Make header positioning context */ | ||
.mw-header { | .mw-header { | ||
position: relative !important; | |||
} | } | ||
/* | /* Absolutely center the search box */ | ||
.mw-header .mw- | .mw-header .vector-search-box, | ||
.mw-header #p-search { | |||
position: absolute !important; | |||
left: 50% !important; | |||
transform: translateX(-50%) !important; | |||
width: min(720px, calc(100vw - 520px)) !important; /* leaves room for left+right UI */ | |||
margin: 0 !important; | |||
} | } | ||
/* | /* Keep the search vertically aligned */ | ||
.mw-header .vector-search-box { | .mw-header .vector-search-box { | ||
top: 50% !important; | |||
transform: translate(-50%, -50%) !important; | |||
} | } | ||
/* | /* Ensure user tools stay right and above any overlap */ | ||
.mw-header .vector-user-links, | .mw-header .vector-user-links, | ||
.mw-header .mw-header-user, | .mw-header .mw-header-user, | ||
.mw-header .vector-user-menu, | .mw-header .vector-user-menu, | ||
.mw-header .vector-user-menu-container { | .mw-header .vector-user-menu-container { | ||
position: relative !important; | |||
z-index: 2 !important; | |||
} | |||
/* Ensure logo/menu stays left and above any overlap */ | |||
.mw-header .mw-logo, | |||
.mw-header .mw-header-start, | |||
.mw-header .vector-header-start { | |||
position: relative !important; | |||
z-index: 2 !important; | |||
} | } | ||
Revision as of 19:16, 13 December 2025
/* =========================================================
TRUE center search (independent of left/right header content)
Vector 2022
========================================================= */
/* Make header positioning context */
.mw-header {
position: relative !important;
}
/* Absolutely center the search box */
.mw-header .vector-search-box,
.mw-header #p-search {
position: absolute !important;
left: 50% !important;
transform: translateX(-50%) !important;
width: min(720px, calc(100vw - 520px)) !important; /* leaves room for left+right UI */
margin: 0 !important;
}
/* Keep the search vertically aligned */
.mw-header .vector-search-box {
top: 50% !important;
transform: translate(-50%, -50%) !important;
}
/* Ensure user tools stay right and above any overlap */
.mw-header .vector-user-links,
.mw-header .mw-header-user,
.mw-header .vector-user-menu,
.mw-header .vector-user-menu-container {
position: relative !important;
z-index: 2 !important;
}
/* Ensure logo/menu stays left and above any overlap */
.mw-header .mw-logo,
.mw-header .mw-header-start,
.mw-header .vector-header-start {
position: relative !important;
z-index: 2 !important;
}