mediawiki-skins-Vector/resources/skins.vector.styles/components/PinnableElement.less
Moh'd Khier Abualruz f83cca3cc5 [Zebra] Merge skins.vector.zebra.styles module into skins.vector.styles
Merges all of the styles in the Zebra module into the default styles.

- skins.vector.zebra.styles ResourceLoader module is removed.
- FIXME's related to Zebra styles are removed.
- Top-level "&" that were used for scoping to feature-flag are removed.
- `$wgVectorZebraDesign` feature flag is removed.

Bug: T347712
Change-Id: I0177541ae87a5d070d5317629ca38de93613d620
2024-01-09 15:46:11 +01:00

47 lines
1.4 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();
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;
}
}
.vector-sticky-pinned-container {
.mixin-vector-scrollable-with-fade();
// Applies styles for making a pinned element sticky
position: sticky;
top: @grid-row-gap;
// Support: Chrome
// Work around sticky-positioned layers disabling subpixel text rendering (T327460).
contain: paint;
// Border-box changes the height calculation.
box-sizing: border-box;
// 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;
}
}