2024-01-09 14:46:11 +00:00
|
|
|
/**
|
|
|
|
* 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();
|
|
|
|
padding: @padding-vertical-dropdown-menu @padding-horizontal-dropdown-menu;
|
|
|
|
display: none;
|
|
|
|
|
|
|
|
// If there is no display grid support we remove pinnable elements
|
|
|
|
@supports ( display: grid ) {
|
|
|
|
display: block;
|
2022-11-28 21:08:40 +00:00
|
|
|
}
|
|
|
|
}
|
2023-11-21 17:01:04 +00:00
|
|
|
|
|
|
|
.vector-sticky-pinned-container {
|
2023-12-01 16:46:56 +00:00
|
|
|
.mixin-vector-scrollable-with-fade();
|
2023-11-21 17:01:04 +00:00
|
|
|
// Applies styles for making a pinned element sticky
|
|
|
|
position: sticky;
|
2024-01-09 14:46:11 +00:00
|
|
|
top: @grid-row-gap;
|
2023-12-01 16:46:56 +00:00
|
|
|
// Support: Chrome
|
|
|
|
// Work around sticky-positioned layers disabling subpixel text rendering (T327460).
|
|
|
|
contain: paint;
|
|
|
|
// Border-box changes the height calculation.
|
|
|
|
box-sizing: border-box;
|
2024-01-09 14:46:11 +00:00
|
|
|
// Height is viewport height - row gap above and below the container.
|
|
|
|
max-height: ~'calc( 100vh - (@{grid-row-gap} * 2) )';
|
|
|
|
}
|
|
|
|
|
|
|
|
@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;
|
|
|
|
}
|
2023-11-21 17:01:04 +00:00
|
|
|
}
|