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();
|
2024-02-13 20:48:48 +00:00
|
|
|
padding: 0 @padding-horizontal-dropdown-menu;
|
|
|
|
margin-bottom: 2rem;
|
2024-01-09 14:46:11 +00:00
|
|
|
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
|
|
|
|
2024-08-22 00:21:23 +00:00
|
|
|
.vector-column-start,
|
|
|
|
.vector-column-end {
|
|
|
|
// Support: Chrome
|
|
|
|
// Work around sticky-positioned layers disabling subpixel text rendering (T327460, T373066).
|
|
|
|
// This must be applied to the possible parent elements of .vector-sticky-pinned-container.
|
|
|
|
contain: paint;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
// 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.
|
|
|
|
*/
|
2024-02-08 16:49:49 +00:00
|
|
|
.client-js .vector-pinned-container {
|
2024-01-09 14:46:11 +00:00
|
|
|
display: none;
|
|
|
|
}
|
2024-02-08 16:40:39 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* T357022 Sticky pinned containers have an ::after psuedo-element used to indicate the
|
|
|
|
* container is scrollable. On lower resolutions sticky pinned containers will always
|
|
|
|
* be empty. We need to set the container to display: none to prevent the psuedo-element
|
|
|
|
* height from affecting the layout
|
|
|
|
*/
|
2024-02-13 20:48:48 +00:00
|
|
|
.client-js .vector-sticky-pinned-container {
|
2024-02-08 16:40:39 +00:00
|
|
|
display: none;
|
|
|
|
}
|
2023-11-21 17:01:04 +00:00
|
|
|
}
|