mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-15 03:34:25 +00:00
99 lines
2.6 KiB
Plaintext
99 lines
2.6 KiB
Plaintext
/**
|
|
* Less mixins for Vector 2022
|
|
*/
|
|
|
|
@import 'mediawiki.mixins.less';
|
|
|
|
.mixin-vector-menu-heading() {
|
|
align-self: center;
|
|
color: @color-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;
|
|
}
|
|
|
|
.mixin-vector-arrowed-dropdown-toggle() {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
|
|
&::after {
|
|
content: '';
|
|
background: url( ./images/arrow-down.svg ) 100% 50% no-repeat;
|
|
width: unit( 12 / @font-size-browser, rem );
|
|
height: unit( 12 / @font-size-browser, rem );
|
|
// https://phabricator.wikimedia.org/T319070#8284272
|
|
margin-left: 7px;
|
|
}
|
|
}
|
|
|
|
.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;
|
|
|
|
&:not( .mw-selflink ):visited {
|
|
color: @color-link;
|
|
}
|
|
|
|
.vector-icon {
|
|
margin-right: @spacing-35;
|
|
}
|
|
|
|
&.selected a,
|
|
&.selected a:visited {
|
|
color: @color-link-selected;
|
|
}
|
|
}
|
|
|
|
.mixin-vector-scrollable-with-fade() {
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
|
|
&::after {
|
|
content: '';
|
|
display: block;
|
|
position: sticky;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 16px;
|
|
background: linear-gradient( rgba( 255, 255, 255, 0 ), @background-color-page-container );
|
|
background-repeat: no-repeat;
|
|
pointer-events: none; // Make the link below the fade clickable
|
|
}
|
|
}
|
|
|
|
.mixin-page-container() {
|
|
max-width: @max-width-page-container;
|
|
// Set a min-width to make explicit we do not support anything below this threshold.
|
|
// For devices too small, they should be more useable with horizontal scrolling.
|
|
// e.g. Portrait on an iPad
|
|
min-width: @min-width-supported;
|
|
margin: 0 auto;
|
|
padding-left: @padding-horizontal-page-container;
|
|
padding-right: @padding-horizontal-page-container;
|
|
background-color: @background-color-page-container;
|
|
box-sizing: border-box;
|
|
|
|
@media ( min-width: @min-width-breakpoint-desktop ) {
|
|
padding-left: @padding-horizontal-page-container-desktop;
|
|
padding-right: @padding-horizontal-page-container-desktop;
|
|
}
|
|
|
|
@media ( min-width: @min-width-breakpoint-desktop-wide ) {
|
|
padding-left: @padding-horizontal-page-container-desktop-wide;
|
|
padding-right: @padding-horizontal-page-container-desktop-wide;
|
|
}
|
|
}
|
|
|
|
.mixin-vector-dropdown-content-flip() {
|
|
// Flip dropdown horizontal alignment
|
|
// FIXME: !important necessary for flipping user links dropdown, remove after VectorZebraDesign is default
|
|
left: auto !important; /* stylelint-disable-line declaration-no-important */
|
|
right: 0;
|
|
}
|