2021-09-09 21:03:15 +00:00
|
|
|
@import '../../common/variables.less';
|
2022-09-29 22:54:55 +00:00
|
|
|
@import '../../common/mixins.less';
|
2021-09-09 21:03:15 +00:00
|
|
|
@import 'mediawiki.mixins.less';
|
|
|
|
|
|
|
|
// Header sizes defined in the description of T246170 and comment T246170#5957100
|
|
|
|
@padding-vertical-header: 0.125em;
|
2022-04-08 22:33:59 +00:00
|
|
|
@margin-top-header: 0.5em;
|
|
|
|
@margin-bottom-header: 2em;
|
2021-09-09 21:03:15 +00:00
|
|
|
|
|
|
|
// Logo sizes per specification in T245190.
|
|
|
|
@height-logo-icon: 3.125em;
|
|
|
|
|
|
|
|
.mw-header {
|
|
|
|
// A min-height is set to account for projects where no icon is set.
|
|
|
|
min-height: @height-logo-icon;
|
2022-08-22 20:23:14 +00:00
|
|
|
padding: 8px 0;
|
2022-07-20 15:09:18 +00:00
|
|
|
// Vertical centering of header elements (IE>=11), requires Flexbox.
|
2021-09-09 21:03:15 +00:00
|
|
|
.flex-display();
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
// https://caniuse.com/#search=align-items
|
|
|
|
align-items: center;
|
|
|
|
|
2022-10-26 17:01:12 +00:00
|
|
|
// FIXME: Remove mixin when this block is removed.
|
|
|
|
.vector-feature-visual-enhancement-next-disabled & {
|
|
|
|
.mixin-vector-flush-left-margin-left();
|
|
|
|
.mixin-vector-flush-right-margin-right();
|
|
|
|
}
|
|
|
|
|
2021-10-05 23:03:51 +00:00
|
|
|
#mw-sidebar-button {
|
2022-11-09 20:53:29 +00:00
|
|
|
.vector-feature-visual-enhancement-next-disabled & {
|
|
|
|
margin-right: @margin-horizontal-sidebar-button-icon;
|
|
|
|
}
|
2021-10-05 23:03:51 +00:00
|
|
|
}
|
|
|
|
|
2022-10-17 20:09:53 +00:00
|
|
|
.vector-header-start,
|
|
|
|
.vector-header-end {
|
2022-05-04 22:20:23 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
2022-10-17 20:09:53 +00:00
|
|
|
.vector-header-start {
|
2022-05-04 22:20:23 +00:00
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
|
2022-10-17 20:09:53 +00:00
|
|
|
.vector-header-end {
|
2022-05-04 22:20:23 +00:00
|
|
|
flex-grow: 1;
|
|
|
|
}
|
|
|
|
|
2022-06-23 21:33:47 +00:00
|
|
|
@media ( min-width: @min-width-desktop-wide ) {
|
2022-06-13 20:57:13 +00:00
|
|
|
// Ensure search box is aligned with content when search thumbnails or JS is off
|
|
|
|
.vector-search-box:not( .vector-search-box-auto-expand-width ),
|
|
|
|
html:not( .client-js ) & .vector-search-box {
|
|
|
|
padding-left: @size-search-expand;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-23 21:33:47 +00:00
|
|
|
@media ( min-width: @min-width-desktop ) {
|
2021-09-09 21:03:15 +00:00
|
|
|
.vector-search-box {
|
2022-06-24 22:44:02 +00:00
|
|
|
margin-right: @margin-end-search;
|
2021-09-09 21:03:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-23 21:33:47 +00:00
|
|
|
@media ( max-width: @max-width-tablet ) {
|
2022-09-01 16:23:55 +00:00
|
|
|
/**
|
|
|
|
* Toggles the visibility of the search box at lower resolutions.
|
|
|
|
*/
|
2021-09-09 21:03:15 +00:00
|
|
|
&.vector-header-search-toggled {
|
|
|
|
#mw-sidebar-button,
|
|
|
|
.mw-logo,
|
|
|
|
.search-toggle {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.vector-search-box-collapses > div {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.vector-search-box {
|
|
|
|
// T284242#7206507: Widen the suggestion results to the edge of the search
|
|
|
|
// button at small resolutions.
|
|
|
|
position: relative;
|
|
|
|
margin-left: @padding-horizontal-tabs;
|
|
|
|
margin-right: @margin-end-search;
|
2022-06-13 20:57:13 +00:00
|
|
|
|
|
|
|
// Override default max width at lower resolutions
|
|
|
|
> div {
|
|
|
|
max-width: none;
|
|
|
|
}
|
2021-09-09 21:03:15 +00:00
|
|
|
}
|
|
|
|
|
2022-02-01 20:52:16 +00:00
|
|
|
// Make the menu below the search input wider, to match the width of the input+button
|
|
|
|
// rather than just the width of the input
|
|
|
|
.cdx-search-input__input-wrapper {
|
2021-09-09 21:03:15 +00:00
|
|
|
position: static;
|
|
|
|
}
|
2022-02-01 20:52:16 +00:00
|
|
|
|
|
|
|
// Since the end button's corner is now right above the menu's corner, don't use a
|
|
|
|
// rounded corner here (T310525)
|
|
|
|
.cdx-typeahead-search--expanded .cdx-search-input__end-button {
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
}
|
2021-09-09 21:03:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|