mediawiki-skins-Vector/resources/common/mixins.less
Nicholas Ray 0243a0125b Moving padding-bottom to mixin-vector-scroll-indicator
Follow-up to 886437, which suggested moving the bottom padding of the scroll
indicator's parent to the `mixin-vector-scroll-indicator-mixin`. This makes
sense because if the correct amount of bottom padding isn't applied, the scroll
indicator could overlap the text when scrolled all the way to the bottom.

Bug: T318169
Change-Id: I94f98ae75f9b80484114a2413caf2cb0c237e8ba
2023-02-07 16:33:44 -07:00

76 lines
2.2 KiB
Plaintext

/**
* Less mixins shared between both legacy and Vector 2022.
*/
@import '../common/variables.less';
.mixin-vector-menu-heading() {
align-self: center;
color: @color-base--subtle;
font-weight: normal;
cursor: default;
// NOTE: Setting these values does not produce a visible border.
// That's handled elsewhere with either border-top-style or border-bottom-style.
border-color: @border-color-portal-heading;
border-width: @border-width-base;
}
// Defines the arrow beside dropdown headings.
.mixin-vector-legacy-menu-heading-arrow {
content: '';
background: url( ../common/images/arrow-down.svg ) 100% 50% no-repeat;
width: unit( 16 / @font-size-tabs / @font-size-browser, em );
height: unit( 16 / @font-size-tabs / @font-size-browser, em );
}
.mixin-vector-menu-heading-arrow() {
content: '';
background: url( ../common/images/arrow-down.svg ) 100% 50% no-repeat;
width: unit( 16 / @font-size-tabs / @font-size-browser, em );
height: unit( 16 / @font-size-tabs / @font-size-browser, em );
// https://phabricator.wikimedia.org/T319070#8284272
margin-left: -1px;
}
// Remove this mixin after VectorPageTools is enabled everywhere
.mixin-vector-dropdown-menu-item-deprecated() {
min-height: @height-dropdown-menu-item;
padding: @padding-dropdown-menu-item;
}
.mixin-vector-dropdown-menu-item() {
display: flex;
align-items: center;
padding: @padding-vertical-dropdown-menu-item @padding-horizontal-dropdown-menu-item;
font-size: @font-size-dropdown;
&:visited {
color: @color-link;
}
&.selected a,
&.selected a:visited {
color: @color-link-selected;
}
}
// Scroll indicator used by TOC and page tools.
.mixin-vector-scroll-indicator() {
// Add extra padding for the fade scrollable indicator.
padding-bottom: @height-scroll-indicator - @padding-vertical-dropdown-menu-item;
&:after {
content: '';
display: block;
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: @height-scroll-indicator;
background: linear-gradient( rgba( 255, 255, 255, 0 ), @background-color-page-container );
background-repeat: no-repeat;
background-position: -12px; // T311436 Hacky way to prevent the fade from covering the scrollbar
pointer-events: none; // Make the link below the fade clickable
}
}