mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 23:55:53 +00:00
ffda1975e3
* Adds sticky behavior to pinned page tools * Moves scroll indicator styles into a mixin shared by TOC and page tools * Replaces the 10px magic number in the TOC used to calculate the bottom padding with the @padding-vertical-dropdown-menu variable. * Increases the pinned TOC max-height per T319315 * Corrects spacing between bottom of sticky header and top of TOC after discussion with designer * Causes 43 visual changes in Pixel that include intentional changes and subpixel rendering changes associated with the `contain: paint` rule. Bug: T318169 Bug: T319315 Change-Id: Ica0c4e0de1825d37d8136b589a9bf5decc96855e
71 lines
2 KiB
Plaintext
71 lines
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() {
|
|
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
|
|
}
|