2021-02-02 10:04:37 +00:00
|
|
|
/**
|
|
|
|
* Vector modern layout styles for screen
|
|
|
|
*
|
|
|
|
* Layout rules divide the page into sections and how VectorComponents should be arranged in the skin.
|
|
|
|
* The rules here should only define the layout, not color or typography.
|
|
|
|
*/
|
|
|
|
|
|
|
|
@import '../../common/variables.less';
|
|
|
|
@import 'mediawiki.mixins.less';
|
|
|
|
|
|
|
|
// Header
|
|
|
|
|
|
|
|
// Header sizes defined in the description of T246170 and comment T246170#5957100
|
|
|
|
@width-grid-column-one: 11em;
|
|
|
|
@padding-vertical-header: 0.125em;
|
|
|
|
@margin-top-header: 0.625em;
|
|
|
|
@margin-bottom-header: 0.3125em;
|
|
|
|
@height-header:
|
|
|
|
@height-logo-icon +
|
|
|
|
@margin-top-header +
|
|
|
|
@margin-bottom-header +
|
|
|
|
2 * @padding-vertical-header;
|
|
|
|
// 3.125em + 0.625em + 0.3125em + 0.25em = 4.3125em
|
|
|
|
|
|
|
|
// Menu button
|
|
|
|
@margin-horizontal-sidebar-button-icon: unit( 12px / @font-size-browser, em); // 0.75em @ 16
|
|
|
|
|
|
|
|
// Logo
|
|
|
|
|
|
|
|
// Logo sizes per specification in T245190.
|
|
|
|
@height-logo-icon: 3.125em;
|
|
|
|
|
|
|
|
// 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 ); // 11.25em @ 16
|
|
|
|
|
|
|
|
// Search
|
|
|
|
|
|
|
|
// Canonical version of spec: T270202
|
|
|
|
// This assumes the presence of variables inside screen.less. DO NOT import it separately.
|
|
|
|
// Assumes various variables defined there.
|
|
|
|
@min-width-search: unit( 150px / @font-size-browser / @font-size-base, em ); // 10.71428571em @ 16 & 0.875em
|
2021-07-15 19:29:18 +00:00
|
|
|
@min-width-search-desktop: unit( 350px / @font-size-browser / @font-size-base, em ); // 25em @ 16 & 0.875em
|
2021-02-02 10:04:37 +00:00
|
|
|
@max-width-search: unit( 500px / @font-size-browser / @font-size-base, em ); // 35.71428571em @ 16 & 0.875em
|
|
|
|
@margin-horizontal-search: unit( 40px / @font-size-browser / @font-size-base, em ); // 2.85714286em @ 16 & 0.875em
|
2021-07-22 21:20:15 +00:00
|
|
|
@margin-end-search: 12px;
|
2021-02-02 10:04:37 +00:00
|
|
|
|
|
|
|
// Personal menu
|
|
|
|
|
|
|
|
@min-width-personal-tools: unit( 300px / @font-size-browser, em ); // 18.75 @ 16
|
|
|
|
|
|
|
|
// Sidebar
|
|
|
|
|
|
|
|
@margin-top-sidebar: 0.5em;
|
|
|
|
|
|
|
|
// Adjust the left position of the sidebar to align it with the sidebar menu button,
|
|
|
|
// in the header, while ensuring the background gradient still extends to the edge of the screen.
|
|
|
|
// note: the 1px comes from the transparent border of the sidebar button.
|
|
|
|
@padding-left-sidebar:
|
|
|
|
@margin-horizontal-sidebar-button-icon +
|
|
|
|
unit( @border-width-base / @font-size-browser, em );
|
|
|
|
|
|
|
|
// Layout containers
|
|
|
|
|
|
|
|
// Page container
|
|
|
|
|
|
|
|
@max-width-page-container: unit( 1650px / @font-size-browser, em ); // 103.125em @ 16
|
|
|
|
@min-width-page-container--padded: @max-width-page-container + ( 2 * @padding-horizontal-page-container ); // 106.875em
|
|
|
|
@padding-horizontal-page-container: unit( 30px / @font-size-browser, em ); // 1.875em @ 16
|
|
|
|
|
|
|
|
// Content containers
|
|
|
|
|
|
|
|
@max-width-workspace-container: unit( 1440px / @font-size-browser, em ); // 90em @ 16
|
|
|
|
@max-width-content-container: unit( 960px / @font-size-browser, em ); // 60em @ 16
|
|
|
|
|
|
|
|
// Note this uses variables defined in mediawiki.skin.variables so that VisualEditor can read them
|
|
|
|
// see T259331.
|
|
|
|
@padding-content: @padding-top-content @padding-horizontal-content 1.5em;
|
|
|
|
// We want ~60px of space between the end of the sidebar and the start of the
|
|
|
|
// content container for aesthetic reasons. The sidebar is already displaced
|
|
|
|
// -30px so we simply add 30px of space to the width of the sidebar.
|
|
|
|
@margin-start-content: @width-grid-column-one + unit( 8px / @font-size-browser, em ); // 11.5em @ 16
|
|
|
|
|
|
|
|
// Tabs
|
|
|
|
|
|
|
|
@height-tabs: 2.5em; // Keep in sync with .vector-menu-tabs height.
|
|
|
|
|
|
|
|
// Breakpoints
|
|
|
|
|
|
|
|
// This determines the maximum width breakpoint at which
|
|
|
|
// the content will have a fixed start margin applied to it when the sidebar
|
|
|
|
// is open. The content can shift its position when the sidebar is open/closed
|
|
|
|
// at or below this breakpoint and will maintain its position above this breakpoint.
|
|
|
|
@max-width-margin-start-content:
|
|
|
|
(2 * @margin-start-content ) +
|
|
|
|
( 2 * @padding-horizontal-page-container ) +
|
|
|
|
@max-width-content-container;
|
|
|
|
// 23em + 3.75em + 60em = 86.75em @ 16
|
|
|
|
|
|
|
|
// Defines the minimum viewport width, at which point the layout will not get any
|
|
|
|
// smaller and will start horizontal scrolling instead.
|
|
|
|
@min-width-supported:
|
|
|
|
unit( 500px / @font-size-browser, em ) -
|
|
|
|
( 2 * @padding-horizontal-page-container );
|
|
|
|
// 31.25em - 3.75em = 27.5em @ 16
|
2021-06-02 22:57:43 +00:00
|
|
|
@min-width-supported-consolidated-links: unit( 340px / @font-size-browser, em );
|
2021-02-02 10:04:37 +00:00
|
|
|
|
|
|
|
// Width used to determine when to break the personal tools onto a separate line
|
|
|
|
// below the search box.
|
|
|
|
@width-comfortable:
|
|
|
|
( 2 * @padding-horizontal-page-container ) +
|
|
|
|
@size-sidebar-button +
|
|
|
|
@margin-horizontal-sidebar-button-icon +
|
|
|
|
@min-width-logo +
|
|
|
|
( 2 * @margin-horizontal-search ) +
|
|
|
|
@max-width-search +
|
|
|
|
@min-width-personal-tools;
|
|
|
|
// 3.75em + 2.75em + 0.75em + 11.25em + 5.71428571em + 35.71428571em + 18.75em = 78.67857142em @ 16
|
|
|
|
|
|
|
|
@border-color-sidebar: @background-color-secondary--modern;
|
|
|
|
@background-color-secondary--modern: #f8f9fa;
|
|
|
|
@background-color-page-container: @background-color-base;
|
2020-08-10 21:40:06 +00:00
|
|
|
|
|
|
|
body {
|
2020-10-30 16:57:38 +00:00
|
|
|
background-color: @background-color-secondary--modern;
|
2020-08-10 21:40:06 +00:00
|
|
|
color: @color-base;
|
|
|
|
// Vertical scrollbar always visible.
|
|
|
|
overflow-y: scroll;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-body,
|
|
|
|
.parsoid-body {
|
|
|
|
direction: ltr;
|
|
|
|
padding: @padding-content;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-body {
|
2020-10-30 16:57:38 +00:00
|
|
|
border-top: @border-width-base @border-style-base @border-color-content;
|
2020-08-10 21:40:06 +00:00
|
|
|
/* Merge the border with tabs' one (in their background image) */
|
|
|
|
margin-top: -@border-width-base;
|
2020-10-30 16:57:38 +00:00
|
|
|
padding: @padding-content;
|
2020-08-10 21:40:06 +00:00
|
|
|
|
|
|
|
.firstHeading {
|
|
|
|
/* Change the default from mediawiki.skinning CSS to let indicators float into heading area */
|
|
|
|
overflow: visible;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-09-08 23:20:58 +00:00
|
|
|
.mw-header {
|
|
|
|
// A min-height is set to account for projects where no icon is set.
|
|
|
|
min-height: @height-logo-icon;
|
2020-08-10 21:40:06 +00:00
|
|
|
margin: @margin-top-header 0 @margin-bottom-header;
|
2020-10-30 16:57:38 +00:00
|
|
|
padding: @padding-vertical-header 0;
|
2020-08-10 21:40:06 +00:00
|
|
|
// Vertical centering of header elements (IE>=11), requires flex.
|
|
|
|
// Non-flex fallback for IE<=9: float rule on the child elements.
|
|
|
|
.flex-display();
|
2020-09-01 12:28:39 +00:00
|
|
|
flex-wrap: wrap;
|
2020-08-10 21:40:06 +00:00
|
|
|
// https://caniuse.com/#search=align-items
|
|
|
|
align-items: center;
|
2020-11-19 17:12:53 +00:00
|
|
|
// allow z-index to apply so search results overlay article
|
|
|
|
position: relative;
|
2020-08-10 21:40:06 +00:00
|
|
|
z-index: @z-index-header;
|
2021-06-02 22:57:43 +00:00
|
|
|
|
|
|
|
.skin-vector-consolidated-user-links & {
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
}
|
2020-08-10 21:40:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Searchbox */
|
|
|
|
#p-search {
|
|
|
|
float: left;
|
2020-10-02 17:43:21 +00:00
|
|
|
margin: 0 0 0 @margin-horizontal-search;
|
2021-02-12 00:45:46 +00:00
|
|
|
z-index: @z-index-menu;
|
2021-06-02 22:57:43 +00:00
|
|
|
flex-grow: 1;
|
|
|
|
|
|
|
|
.skin-vector-consolidated-user-links & {
|
|
|
|
margin: 0;
|
|
|
|
}
|
2020-10-02 17:43:21 +00:00
|
|
|
|
2020-12-17 06:33:40 +00:00
|
|
|
// #searchform is only a direct child of #p-search before wvui-loads. After
|
|
|
|
// wvui loads, `.wvui-typeahead-search` becomes the direct child and is the
|
|
|
|
// element where these styles should apply.
|
2021-06-02 22:57:43 +00:00
|
|
|
// FIXME: The first selector (> #searchform)
|
|
|
|
// is for cached HTML. Should be removed when T276566 has been in production.
|
2020-12-17 06:33:40 +00:00
|
|
|
> #searchform,
|
2021-06-02 22:57:43 +00:00
|
|
|
> div > #searchform,
|
2020-12-17 06:33:40 +00:00
|
|
|
.wvui-typeahead-search {
|
|
|
|
// Border-box sizing is used for a smooth transition from legacy to Vue
|
|
|
|
// search. The width of the container should stay the same before/after the
|
|
|
|
// transition.
|
|
|
|
.box-sizing( border-box );
|
2020-10-02 17:43:21 +00:00
|
|
|
margin-left: 0;
|
|
|
|
}
|
2020-08-10 21:40:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Main column */
|
|
|
|
.mw-body,
|
|
|
|
#mw-data-after-content,
|
|
|
|
#left-navigation,
|
|
|
|
.mw-footer {
|
2020-10-30 16:57:38 +00:00
|
|
|
margin-left: 0;
|
2020-08-10 21:40:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Content */
|
|
|
|
.mw-indicators {
|
|
|
|
z-index: @z-index-indicators;
|
|
|
|
}
|
|
|
|
|
2021-01-22 18:24:34 +00:00
|
|
|
.mw-body-header {
|
|
|
|
.mixin-clearfix();
|
|
|
|
}
|
|
|
|
|
2021-05-03 13:48:46 +00:00
|
|
|
// TODO: Can be changed to `.mw-body .mw-portlet-lang` when langauge-in-header feature is default.
|
|
|
|
.mw-body #p-lang-btn {
|
|
|
|
float: right;
|
|
|
|
}
|
2021-05-21 01:02:07 +00:00
|
|
|
// FIXME: [ id='bodyContent' ] selector needed for cached HTML.
|
|
|
|
[ id='bodyContent' ],
|
|
|
|
.vector-body {
|
2020-08-10 21:40:06 +00:00
|
|
|
position: relative;
|
|
|
|
z-index: @z-index-base;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Hide, but keep accessible for screen-readers */
|
|
|
|
#mw-navigation h2 {
|
|
|
|
position: absolute;
|
|
|
|
top: -9999px;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Navigation Containers */
|
2020-09-08 23:20:58 +00:00
|
|
|
.mw-article-toolbar-container {
|
|
|
|
// Clear the floats on #left-navigation and #right-navigation.
|
|
|
|
.mixin-clearfix();
|
2020-10-30 16:57:38 +00:00
|
|
|
// We want to keep the max-width of the article-toolbar-container the
|
|
|
|
// same max-width as the article page's content container in order to
|
|
|
|
// prevent it from moving when going from an article page to a
|
|
|
|
// history/special page.
|
|
|
|
max-width: @max-width-content-container;
|
|
|
|
margin-left: auto;
|
|
|
|
margin-right: auto;
|
2020-09-08 23:20:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#left-navigation {
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
|
2020-08-10 21:40:06 +00:00
|
|
|
#right-navigation {
|
|
|
|
float: right;
|
2021-03-24 14:01:04 +00:00
|
|
|
|
|
|
|
// Any dropdowns inside the right navigation in modern Vector (e.g. "more" menu).
|
|
|
|
// should be right-aligned to prevent horizontal scrolling.
|
|
|
|
.vector-menu-content {
|
|
|
|
left: auto;
|
|
|
|
right: -@border-width-base;
|
|
|
|
}
|
2020-08-10 21:40:06 +00:00
|
|
|
}
|
|
|
|
|
2021-05-07 21:56:29 +00:00
|
|
|
// When ConsolidateUserLinks is off, "vector-user-menu-legacy" is used in modern Vector
|
|
|
|
.vector-user-menu-legacy {
|
2020-10-02 17:43:21 +00:00
|
|
|
flex-grow: 1;
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2020-08-17 22:08:22 +00:00
|
|
|
#mw-sidebar-button {
|
2020-09-01 12:28:39 +00:00
|
|
|
float: left; // Browser: IE9 support - button as flex-child fallback.
|
2020-08-17 22:08:22 +00:00
|
|
|
margin-left: -@margin-horizontal-sidebar-button-icon;
|
|
|
|
margin-right: @margin-horizontal-sidebar-button-icon; // Accidentally the same.
|
|
|
|
}
|
|
|
|
|
2020-09-08 23:20:58 +00:00
|
|
|
#mw-panel {
|
2020-11-09 15:49:56 +00:00
|
|
|
background-image: linear-gradient( to bottom, @background-color-base 0%, @background-color-secondary--modern 10%, @background-color-secondary--modern 90%, @background-color-base 100% );
|
2020-09-08 23:20:58 +00:00
|
|
|
position: absolute;
|
2020-10-30 16:57:38 +00:00
|
|
|
// Sidebar is displaced from the workspace container so that the
|
|
|
|
// sidebar is flush with the edge of the screen at small widths.
|
|
|
|
left: -@padding-horizontal-page-container;
|
2020-08-10 21:40:06 +00:00
|
|
|
width: @width-grid-column-one;
|
|
|
|
.box-sizing( border-box );
|
2020-10-30 16:57:38 +00:00
|
|
|
// To avoid the white part of the gradient colliding with the sidebar links
|
|
|
|
// we apply top and bottom padding.
|
|
|
|
padding: 8px 0 40px @padding-left-sidebar;
|
2020-08-10 21:40:06 +00:00
|
|
|
z-index: @z-index-sidebar;
|
2020-10-30 16:57:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.parsoid-body {
|
|
|
|
padding: @padding-content;
|
|
|
|
}
|
|
|
|
|
|
|
|
#p-namespaces {
|
|
|
|
background-image: none;
|
|
|
|
padding-left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-footer {
|
|
|
|
border-top: @border-base;
|
2021-02-02 10:04:37 +00:00
|
|
|
padding: 0.75em;
|
2020-10-30 16:57:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Container logic.
|
|
|
|
.mw-page-container {
|
|
|
|
max-width: @max-width-page-container;
|
|
|
|
// Fill the viewport even if the content height is small. This also helps
|
|
|
|
// mitigate a long sidebar overflowing the page container (T257518).
|
|
|
|
min-height: 100%;
|
|
|
|
margin-left: auto;
|
|
|
|
margin-right: auto;
|
2021-01-05 18:01:45 +00:00
|
|
|
// Use non-zero padding to disable margin collapse.
|
|
|
|
// Be careful not to use overflow-y: scroll here (see T270146 and T271868)
|
|
|
|
padding: 0.05px ( @padding-horizontal-page-container / 2 );
|
2020-10-30 16:57:38 +00:00
|
|
|
background-color: @background-color-page-container;
|
2021-06-02 22:57:43 +00:00
|
|
|
// Set a min-width to make explicit we do not support anything below this threshold.
|
|
|
|
// For devices too small, they should be more useable with horizontal scrolling.
|
|
|
|
// e.g. Portrait on an iPad
|
|
|
|
min-width: @min-width-supported;
|
|
|
|
|
|
|
|
// When consolidated user links is enabled, there is more space for compression.
|
|
|
|
.skin-vector-consolidated-user-links & {
|
|
|
|
min-width: @min-width-supported-consolidated-links;
|
|
|
|
}
|
2020-10-30 16:57:38 +00:00
|
|
|
}
|
|
|
|
|
2021-01-29 01:53:27 +00:00
|
|
|
.skin--responsive .mw-page-container {
|
|
|
|
min-width: auto;
|
|
|
|
}
|
|
|
|
|
2020-10-30 16:57:38 +00:00
|
|
|
// Used as a container for absolutely positioned elements.
|
|
|
|
.mw-page-container-inner {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-workspace-container {
|
|
|
|
max-width: @max-width-workspace-container;
|
|
|
|
margin-left: auto;
|
|
|
|
margin-right: auto;
|
|
|
|
// The sidebar is absolutely positioned relative to the
|
|
|
|
// mw-workspace-container.
|
|
|
|
position: relative;
|
2020-10-15 19:26:51 +00:00
|
|
|
|
|
|
|
&.mw-footer-container {
|
|
|
|
// T264679: There are elements (e.g. discussion tool popovers) in the main
|
|
|
|
// content container that we want to appear on top of the footer. We set the
|
|
|
|
// footer container to have static positioning instead of relative
|
|
|
|
// positioning (applied by .mw-workspace-container) to enable this.
|
|
|
|
position: static;
|
|
|
|
}
|
2020-10-30 16:57:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mw-content-container {
|
|
|
|
max-width: @max-width-content-container;
|
|
|
|
margin-left: auto;
|
|
|
|
margin-right: auto;
|
2020-10-01 22:55:52 +00:00
|
|
|
|
|
|
|
// For container logic specific to special pages and history pages.
|
2021-01-06 21:50:19 +00:00
|
|
|
.skin-vector-disable-max-width & {
|
2020-10-01 22:55:52 +00:00
|
|
|
// Allow the max-width of content on history/special pages to be wider than
|
|
|
|
// the max-width of content on article pages.
|
|
|
|
max-width: none;
|
|
|
|
}
|
2020-10-30 16:57:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mw-sidebar-container {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-footer-container {
|
|
|
|
padding-top: 50px;
|
|
|
|
padding-bottom: 82px;
|
|
|
|
}
|
|
|
|
|
|
|
|
// We want it to appear like the sidebar is going into/coming out of
|
|
|
|
// `.mw-page-container`, but we can't use `overflow: hidden` on
|
|
|
|
// `.mw-page-container` because that will cut off the sidebar. Therefore, we
|
|
|
|
// calculate the maximum distance from the start of `mw-page-container` to the
|
|
|
|
// start of the sidebar.
|
|
|
|
#mw-sidebar-checkbox:not( :checked ) ~ .mw-workspace-container .mw-sidebar {
|
|
|
|
.transform( translateX( -( @max-width-page-container - @max-width-workspace-container ) / 2 ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
// Responsive overrides.
|
|
|
|
@media ( min-width: @min-width-page-container--padded ) {
|
|
|
|
.mw-page-container {
|
|
|
|
border-left: 1px solid @border-color-sidebar;
|
|
|
|
border-right: 1px solid @border-color-sidebar;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-10-01 22:55:52 +00:00
|
|
|
// Adjusts the content when sidebar is open regardless of the viewport width.
|
|
|
|
.mw-checkbox-hack-checkbox:checked ~ .mw-workspace-container .mw-content-container {
|
|
|
|
// For container logic specific to special pages and history pages.
|
2021-01-06 21:50:19 +00:00
|
|
|
.skin-vector-disable-max-width & {
|
2020-10-01 22:55:52 +00:00
|
|
|
margin-left: @margin-start-content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-10-30 16:57:38 +00:00
|
|
|
@media ( max-width: @max-width-margin-start-content ) {
|
|
|
|
// Adjusts the content and mw-article-toolbar-container.
|
|
|
|
.mw-checkbox-hack-checkbox:checked ~ .mw-workspace-container .mw-content-container,
|
|
|
|
.mw-checkbox-hack-checkbox:checked ~ .mw-workspace-container .mw-article-toolbar-container {
|
|
|
|
margin-left: @margin-start-content;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Specificity needed to disable the default animations at lower resolutions.
|
|
|
|
.vector-animations-ready .mw-sidebar {
|
|
|
|
// Remove sidebar transition at smaller widths.
|
|
|
|
.transition( none );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ( min-width: ( @max-width-workspace-container + ( 2 * @padding-horizontal-page-container ) ) ) {
|
|
|
|
#mw-panel {
|
|
|
|
background: @background-color-page-container;
|
|
|
|
border-right: 1px solid @border-color-sidebar;
|
|
|
|
}
|
2020-08-10 21:40:06 +00:00
|
|
|
}
|
2020-10-02 17:43:21 +00:00
|
|
|
|
|
|
|
// 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.
|
2021-07-22 17:46:21 +00:00
|
|
|
// FIXME: Remove these styles and the @width-comfortable breakpoint after user links has become the default
|
2020-10-02 17:43:21 +00:00
|
|
|
@media ( max-width: @width-comfortable ) {
|
2021-07-22 17:46:21 +00:00
|
|
|
body:not( .skin-vector-consolidated-user-links ) {
|
|
|
|
#p-search > div > #searchform,
|
|
|
|
#p-search .wvui-typeahead-search {
|
|
|
|
margin-left: auto;
|
|
|
|
}
|
2020-10-02 17:43:21 +00:00
|
|
|
}
|
|
|
|
}
|
2020-10-01 22:55:52 +00:00
|
|
|
|
2021-07-15 19:29:18 +00:00
|
|
|
@media ( min-width: @width-breakpoint-desktop ) {
|
2021-06-02 22:57:43 +00:00
|
|
|
.mw-header {
|
|
|
|
flex-wrap: wrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
#p-search,
|
|
|
|
.skin-vector-consolidated-user-links #p-search {
|
2021-07-22 21:20:15 +00:00
|
|
|
margin: 0 @margin-end-search 0 @margin-horizontal-search;
|
2021-06-02 22:57:43 +00:00
|
|
|
// Support: IE 8, Firefox 18-, Chrome 19-, Safari 5.1-, Opera 19-, Android 4.4.4-.
|
|
|
|
width: 13.2em;
|
|
|
|
// Support: Modern browsers, responsive width.
|
|
|
|
width: 20vw;
|
|
|
|
max-width: 100%;
|
2021-07-15 19:29:18 +00:00
|
|
|
min-width: @min-width-search-desktop;
|
2021-06-02 22:57:43 +00:00
|
|
|
flex-basis: @min-width-search;
|
|
|
|
flex-grow: 1;
|
2021-06-30 07:36:23 +00:00
|
|
|
|
|
|
|
> div > #searchform,
|
|
|
|
.wvui-typeahead-search {
|
|
|
|
max-width: @max-width-search;
|
|
|
|
}
|
2020-10-01 22:55:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mw-page-container {
|
2021-01-15 18:47:52 +00:00
|
|
|
padding-left: @padding-horizontal-page-container;
|
|
|
|
padding-right: @padding-horizontal-page-container;
|
2020-10-01 22:55:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-30 07:36:23 +00:00
|
|
|
/**
|
|
|
|
* Toggles the visibility of the search box at lower resolutions.
|
|
|
|
*/
|
2021-07-15 19:29:18 +00:00
|
|
|
@media ( max-width: @width-breakpoint-desktop ) {
|
2021-06-30 07:36:23 +00:00
|
|
|
.vector-header-search-toggled {
|
|
|
|
#mw-sidebar-button,
|
|
|
|
.mw-logo,
|
|
|
|
.search-toggle {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.vector-search-box-collapses > div {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
#p-search {
|
2021-07-14 19:20:34 +00:00
|
|
|
// T284242#7206507: Widen the suggestion results to the edge of the search
|
|
|
|
// button at small resolutions.
|
|
|
|
position: relative;
|
2021-07-14 19:24:50 +00:00
|
|
|
margin-left: @padding-horizontal-tabs;
|
2021-07-22 21:20:15 +00:00
|
|
|
margin-right: @margin-end-search;
|
2021-07-14 19:24:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Increase the start margin of the search box to account for the input
|
|
|
|
// expanding on focus.
|
|
|
|
#p-search.vector-search-box-show-thumbnail {
|
|
|
|
margin-left: @size-search-expand + @padding-horizontal-tabs;
|
2021-07-14 19:20:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.wvui-typeahead-search__wrapper {
|
|
|
|
position: static;
|
2021-06-30 07:36:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-10-01 22:55:52 +00:00
|
|
|
/**
|
|
|
|
* Makes the sidebar full screen at lower resolutions.
|
|
|
|
*/
|
|
|
|
@media ( max-width: @width-breakpoint-tablet ) {
|
|
|
|
.mw-checkbox-hack-checkbox:checked ~ .mw-workspace-container {
|
|
|
|
#mw-panel {
|
|
|
|
width: 100%;
|
|
|
|
position: relative;
|
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// !important as we always want to disable the margin-left on these elements
|
|
|
|
// Using !important is cleaner than having to rely on specificity involved :checked elements
|
|
|
|
.mw-content-container,
|
|
|
|
.mw-article-toolbar-container {
|
|
|
|
// stylelint-disable-next-line declaration-no-important
|
|
|
|
margin-left: 0 !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|