MediaWiki:Common.css: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* ========================================================= | /* ========================================================= | ||
Vector 2022: Center header search WITHOUT moving user tools | |||
========================================================= */ | ========================================================= */ | ||
/* | /* Use Vector's real header row as the layout context */ | ||
.vector-header { | |||
position: relative !important; | |||
display: flex !important; | |||
.vector | |||
display: | |||
align-items: center !important; | align-items: center !important; | ||
} | } | ||
/* | /* Force the right-side tools to remain FAR RIGHT */ | ||
.vector-header-end { | |||
. | |||
margin-left: auto !important; | margin-left: auto !important; | ||
display: flex !important; | |||
align-items: center !important; | |||
justify-content: flex-end !important; | |||
} | } | ||
/* Center ONLY the | /* Center ONLY the actual search box (do NOT touch wrappers like [role="search"]) */ | ||
. | .vector-header .vector-search-box, | ||
. | .vector-header .vector-search-box-vue, | ||
. | .vector-header #p-search { | ||
position: absolute !important; | position: absolute !important; | ||
left: 50% !important; | left: 50% !important; | ||
top: 50% !important; | top: 50% !important; | ||
transform: translate(-50%, -50%) !important; | transform: translate(-50%, -50%) !important; | ||
margin: 0 !important; | |||
z-index: 1 !important; | |||
width: min(620px, calc(100vw - 760px)) !important; | width: min(620px, calc(100vw - 760px)) !important; | ||
} | } | ||
/* Keep user | /* Keep user tools clickable above any overlap */ | ||
.vector-header-end, | |||
.vector-user-links, | |||
.vector-user-menu, | |||
#p-personal { | |||
position: relative !important; | position: relative !important; | ||
z-index: 2 !important; | z-index: 2 !important; | ||
} | } | ||
/* Mobile: | /* Mobile: revert to normal flow */ | ||
@media (max-width: 900px) { | @media (max-width: 900px) { | ||
. | .vector-header .vector-search-box, | ||
. | .vector-header .vector-search-box-vue, | ||
. | .vector-header #p-search { | ||
position: static !important; | position: static !important; | ||
transform: none !important; | transform: none !important; | ||
width: 100% !important; | width: 100% !important; | ||
margin: 8px | margin-top: 8px !important; | ||
} | } | ||
} | } | ||
Revision as of 09:54, 15 December 2025
/* =========================================================
Vector 2022: Center header search WITHOUT moving user tools
========================================================= */
/* Use Vector's real header row as the layout context */
.vector-header {
position: relative !important;
display: flex !important;
align-items: center !important;
}
/* Force the right-side tools to remain FAR RIGHT */
.vector-header-end {
margin-left: auto !important;
display: flex !important;
align-items: center !important;
justify-content: flex-end !important;
}
/* Center ONLY the actual search box (do NOT touch wrappers like [role="search"]) */
.vector-header .vector-search-box,
.vector-header .vector-search-box-vue,
.vector-header #p-search {
position: absolute !important;
left: 50% !important;
top: 50% !important;
transform: translate(-50%, -50%) !important;
margin: 0 !important;
z-index: 1 !important;
width: min(620px, calc(100vw - 760px)) !important;
}
/* Keep user tools clickable above any overlap */
.vector-header-end,
.vector-user-links,
.vector-user-menu,
#p-personal {
position: relative !important;
z-index: 2 !important;
}
/* Mobile: revert to normal flow */
@media (max-width: 900px) {
.vector-header .vector-search-box,
.vector-header .vector-search-box-vue,
.vector-header #p-search {
position: static !important;
transform: none !important;
width: 100% !important;
margin-top: 8px !important;
}
}