mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-12 16:05:17 +00:00
b55d95c70c
Replacing the legacy Vector breakpoint tokens with the Codex standard ones. All names have been unified, only some legacy values remain for backwards compatibility. Also - replacing a wrongly applied min-width with the correct max-width token, - replacing a width with an equal value min-width one and - removing the now equal value mobile min-width one. Note that we can't do some reference magic here alike `@max-width-breakpoint-mobile: @min-width-breakpoint-tablet - 1px;` as this would take the Codex value from skin variables and not the legacy value. Also note, that we could move all those Vector legacy definitions into Vector's 'mediawiki.skin.variables.less' file(s), but that would mean that extensions don't rely on the Codex default values, but on Vector's and we want latter to move to the standard, also in foresight of further standardization to build for all feature teams like a shared Grid. Bug: T331403 Change-Id: Ifb968b1977001edb1a79e20df387c61f27043542
45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
/**
|
|
* PinnableElement
|
|
* Pinned containers are typically dropdown menus that have been
|
|
* placed in a sidebar column, e.g. page tools menu, main menu.
|
|
*/
|
|
|
|
.vector-pinnable-element {
|
|
font-size: @font-size-dropdown;
|
|
}
|
|
|
|
.vector-pinned-container {
|
|
.mixin-vector-content-box();
|
|
.mixin-vector-scrollable-with-fade();
|
|
// Border-box changes the height calculation.
|
|
box-sizing: border-box;
|
|
padding: @padding-vertical-dropdown-menu @padding-horizontal-dropdown-menu;
|
|
margin-bottom: @grid-column-gap;
|
|
// Height is viewport height - row gap above and below the container.
|
|
max-height: ~'calc( 100vh - (@{grid-row-gap} * 2) )';
|
|
display: none;
|
|
|
|
// If there is no display grid support we remove pinnable elements
|
|
@supports ( display: grid ) {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
.vector-sticky-pinned-container {
|
|
// Applies styles for making a pinned element sticky
|
|
position: sticky;
|
|
top: @grid-row-gap;
|
|
}
|
|
|
|
@media ( max-width: @max-width-breakpoint-tablet ) {
|
|
/**
|
|
* At lower resolutions, we want to hide the pinned containers when JS is enabled since these
|
|
* elements collapse (become unpinned) at this resolution via PinnableElement.js.
|
|
* Although this is handled in JS, this rule prevents the pinned menu from
|
|
* appearing on pageload, at low resolutions, before the JS kicks in.
|
|
*/
|
|
&.client-js .vector-pinned-container {
|
|
display: none;
|
|
}
|
|
}
|