2023-04-20 05:34:45 +00:00
|
|
|
/**
|
|
|
|
* PinnableElement
|
|
|
|
* Pinned containers are typically dropdown menus that have been
|
|
|
|
* placed in a sidebar column, e.g. page tools menu, main menu.
|
|
|
|
*/
|
2023-04-19 15:35:48 +00:00
|
|
|
|
2023-04-20 05:34:45 +00:00
|
|
|
.vector-pinnable-element {
|
|
|
|
font-size: @font-size-dropdown;
|
|
|
|
}
|
|
|
|
|
|
|
|
.vector-pinned-container {
|
|
|
|
.mixin-vector-content-box();
|
2023-05-03 15:53:54 +00:00
|
|
|
.mixin-vector-scrollable-with-fade();
|
|
|
|
// Border-box changes the height calculation.
|
|
|
|
box-sizing: border-box;
|
2023-04-20 05:34:45 +00:00
|
|
|
padding: @padding-vertical-dropdown-menu @padding-horizontal-dropdown-menu;
|
|
|
|
margin-bottom: @grid-column-gap;
|
2023-05-03 15:53:54 +00:00
|
|
|
// Height is viewport height - row gap above and below the container.
|
|
|
|
max-height: ~'calc( 100vh - (@{grid-row-gap} * 2) )';
|
2023-10-17 03:31:18 +00:00
|
|
|
display: none;
|
|
|
|
|
|
|
|
// If there is no display grid support we remove pinnable elements
|
|
|
|
@supports ( display: grid ) {
|
|
|
|
display: block;
|
|
|
|
}
|
2023-04-19 15:35:48 +00:00
|
|
|
}
|
|
|
|
|
2023-04-21 16:42:31 +00:00
|
|
|
.vector-sticky-pinned-container {
|
2023-10-17 03:31:18 +00:00
|
|
|
// Applies styles for making a pinned element sticky
|
2023-05-03 15:53:54 +00:00
|
|
|
position: sticky;
|
|
|
|
top: @grid-row-gap;
|
2023-04-21 16:42:31 +00:00
|
|
|
}
|
|
|
|
|
2023-04-19 15:35:48 +00:00
|
|
|
@media ( max-width: @max-width-tablet ) {
|
2023-10-17 03:31:18 +00:00
|
|
|
/**
|
|
|
|
* 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-04-19 15:35:48 +00:00
|
|
|
}
|
|
|
|
}
|