2023-04-19 15:35:48 +00:00
|
|
|
/**
|
2023-04-20 05:34:45 +00:00
|
|
|
* Less mixins.
|
2023-04-19 15:35:48 +00:00
|
|
|
*/
|
2023-10-02 17:52:33 +00:00
|
|
|
@import 'mediawiki.mixins.less';
|
2023-04-19 15:35:48 +00:00
|
|
|
|
2023-04-20 05:34:45 +00:00
|
|
|
.mixin-vector-page-container-sizing() {
|
|
|
|
// 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;
|
|
|
|
max-width: @max-width-page-container;
|
|
|
|
padding-left: @padding-horizontal-page-container;
|
|
|
|
padding-right: @padding-horizontal-page-container;
|
|
|
|
box-sizing: border-box;
|
2023-04-19 15:35:48 +00:00
|
|
|
}
|
|
|
|
|
2023-04-27 20:39:40 +00:00
|
|
|
.mixin-vector-arrowed-dropdown-toggle() {
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
content: '';
|
2023-10-02 18:15:06 +00:00
|
|
|
background: url( ../skins.vector.styles/images/arrow-down.svg ) 100% 50% no-repeat;
|
2023-10-30 15:22:46 +00:00
|
|
|
width: unit( 12 / @font-size-browser, rem );
|
|
|
|
height: unit( 12 / @font-size-browser, rem );
|
2023-04-27 20:39:40 +00:00
|
|
|
// https://phabricator.wikimedia.org/T319070#8284272
|
2023-10-30 15:22:46 +00:00
|
|
|
margin-left: 7px;
|
2023-04-27 20:39:40 +00:00
|
|
|
}
|
2023-04-19 15:35:48 +00:00
|
|
|
}
|
|
|
|
|
2023-04-20 05:34:45 +00:00
|
|
|
.mixin-vector-content-box() {
|
|
|
|
background-color: @background-color-base;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mixin-vector-dropdown-menu() {
|
|
|
|
.mixin-vector-content-box();
|
|
|
|
padding: @padding-horizontal-dropdown-menu @padding-vertical-dropdown-menu;
|
|
|
|
font-size: @font-size-dropdown;
|
|
|
|
box-shadow: 0 2px 6px -1px rgba( 0, 0, 0, 0.2 );
|
|
|
|
transition-property: opacity;
|
|
|
|
transition-duration: @transition-duration-base;
|
|
|
|
// TODO Add consistent min/max values for dropdowns in T316055
|
|
|
|
width: max-content;
|
|
|
|
max-width: 200px;
|
|
|
|
}
|
|
|
|
|
2023-04-19 15:35:48 +00:00
|
|
|
.mixin-vector-dropdown-menu-item() {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2023-04-20 05:34:45 +00:00
|
|
|
padding: @padding-vertical-dropdown-menu-item 0;
|
2023-04-19 15:35:48 +00:00
|
|
|
|
|
|
|
&:not( .mw-selflink ):visited {
|
|
|
|
color: @color-link;
|
|
|
|
}
|
|
|
|
|
2023-04-27 20:39:40 +00:00
|
|
|
.vector-icon {
|
|
|
|
margin-right: @spacing-35;
|
|
|
|
}
|
|
|
|
|
2023-04-19 15:35:48 +00:00
|
|
|
&.selected a,
|
|
|
|
&.selected a:visited {
|
|
|
|
color: @color-link-selected;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-03 15:53:54 +00:00
|
|
|
.mixin-vector-scrollable-with-fade() {
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
position: sticky;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
2023-05-09 13:37:17 +00:00
|
|
|
width: ~'calc( 100% + @{padding-vertical-dropdown-menu} )';
|
2023-05-03 15:53:54 +00:00
|
|
|
height: @padding-vertical-dropdown-menu;
|
|
|
|
margin-top: -@padding-vertical-dropdown-menu;
|
2023-05-09 13:37:17 +00:00
|
|
|
margin-left: -@padding-vertical-dropdown-menu;
|
|
|
|
transform: translate( 0, @padding-vertical-dropdown-menu );
|
2023-05-03 15:53:54 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
2023-06-21 20:13:22 +00:00
|
|
|
|
|
|
|
.mixin-vector-dropdown-content-flip() {
|
|
|
|
// Flip dropdown horizontal alignment
|
2023-06-26 16:54:44 +00:00
|
|
|
// FIXME: !important necessary for flipping user links dropdown, remove after VectorZebraDesign is default
|
|
|
|
left: auto !important; /* stylelint-disable-line declaration-no-important */
|
2023-06-21 20:13:22 +00:00
|
|
|
right: 0;
|
|
|
|
}
|