mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-18 05:01:25 +00:00
9b31740514
* The margin-left should only be auto at small resolutions - otherwise on large monitors it becomes visually separated from the logo * the margin left should be larger * and max width should be smaller. Bug: T261686 Change-Id: Ia1331f51764a34f113e3336735e6cfd5fde1d49d
65 lines
2.3 KiB
Plaintext
65 lines
2.3 KiB
Plaintext
// This assumes the presence of variables inside layout.less. DO NOT import it separately.
|
|
// Assumes various variables defined there.
|
|
|
|
@min-width-search: unit( 350px / @font-size-browser, em );
|
|
@max-width-search: unit( 450px / @font-size-browser, em );
|
|
@margin-horizontal-search: unit( 56px / @font-size-browser, em );
|
|
|
|
// The logo is variable width but typically consists of:
|
|
// - a icon (50x50)
|
|
// - a wordmark (approx 120px)
|
|
@min-width-logo: unit( 180px / @font-size-browser, em );
|
|
|
|
@min-width-personal-tools: unit( 300px / @font-size-browser, em );
|
|
|
|
@padding-horizontal-page-container: 30px;
|
|
@padding-horizontal-page-container-ems: unit( @padding-horizontal-page-container / @font-size-browser, em );
|
|
@margin-horizontal-sidebar-button-icon-ems: unit( @margin-horizontal-sidebar-button-icon / @font-size-browser, em );
|
|
@padding-horizontal-page-container-ems: unit( @padding-horizontal-page-container / @font-size-browser, em );
|
|
|
|
// the width of the container if you exclude consideration for search
|
|
@min-width-container-base: @padding-horizontal-page-container-ems + @size-sidebar-button + @margin-horizontal-sidebar-button-icon-ems + @min-width-logo + @min-width-personal-tools + @padding-horizontal-page-container-ems;
|
|
|
|
@min-width-supported: @min-width-container-base + @min-width-search;
|
|
@width-comfortable: @min-width-container-base + @margin-horizontal-search + @max-width-search + @margin-horizontal-search;
|
|
|
|
@height-personal-tools: 2em;
|
|
|
|
.skin-vector-search-header {
|
|
|
|
// Header components
|
|
#p-search {
|
|
flex-grow: 1;
|
|
// Support IE9: float will be disabled if display flex is supported
|
|
float: left;
|
|
// Override values to reflect new behaviour.
|
|
min-width: @min-width-search;
|
|
max-width: 100%;
|
|
margin: 0 0 0 @margin-horizontal-search;
|
|
|
|
#searchform {
|
|
margin-left: 0;
|
|
max-width: @max-width-search;
|
|
}
|
|
}
|
|
|
|
#p-personal {
|
|
flex-grow: 1;
|
|
text-align: right;
|
|
flex-basis: @min-width-personal-tools;
|
|
margin-left: @margin-horizontal-search;
|
|
|
|
// Support IE9: This is reset in @support query below if Flexbox is available.
|
|
float: right;
|
|
}
|
|
|
|
// At low resolutions the search must be pushed to the right of the screen
|
|
// We use @width-comfortable to determine this threshold as we know it's not possible for
|
|
// personal tools to be on the same line at this resolution.
|
|
@media ( max-width: @width-comfortable ) {
|
|
#p-search #searchform {
|
|
margin-left: auto;
|
|
}
|
|
}
|
|
}
|