2022-07-22 16:11:36 +00:00
|
|
|
/**
|
|
|
|
* Less mixins shared between both legacy and Vector 2022.
|
|
|
|
*/
|
|
|
|
|
2022-11-17 04:45:51 +00:00
|
|
|
@import '../common/variables.less';
|
|
|
|
|
|
|
|
.mixin-vector-menu-heading() {
|
|
|
|
align-self: center;
|
2023-04-23 13:48:55 +00:00
|
|
|
color: @color-subtle;
|
2022-11-17 04:45:51 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2022-07-22 16:11:36 +00:00
|
|
|
// Defines the arrow beside dropdown headings.
|
2022-11-07 22:57:31 +00:00
|
|
|
.mixin-vector-legacy-menu-heading-arrow {
|
2022-07-22 16:11:36 +00:00
|
|
|
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 );
|
2022-11-07 22:57:31 +00:00
|
|
|
}
|
2022-10-05 16:19:26 +00:00
|
|
|
|
2023-04-27 20:39:40 +00:00
|
|
|
.mixin-vector-arrowed-dropdown-toggle() {
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
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;
|
|
|
|
}
|
2022-07-22 16:11:36 +00:00
|
|
|
}
|
2022-07-22 19:20:55 +00:00
|
|
|
|
2022-12-19 16:27:54 +00:00
|
|
|
.mixin-vector-dropdown-menu-item() {
|
2022-07-22 19:20:55 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2022-12-19 16:27:54 +00:00
|
|
|
padding: @padding-vertical-dropdown-menu-item @padding-horizontal-dropdown-menu-item;
|
2022-11-17 04:45:51 +00:00
|
|
|
font-size: @font-size-dropdown;
|
2022-07-22 19:20:55 +00:00
|
|
|
|
2023-02-03 00:35:07 +00:00
|
|
|
&:not( .mw-selflink ):visited {
|
2022-07-22 19:20:55 +00:00
|
|
|
color: @color-link;
|
|
|
|
}
|
|
|
|
|
2023-04-27 20:39:40 +00:00
|
|
|
.vector-icon {
|
|
|
|
margin-right: @spacing-35;
|
|
|
|
}
|
|
|
|
|
2022-07-22 19:20:55 +00:00
|
|
|
&.selected a,
|
|
|
|
&.selected a:visited {
|
|
|
|
color: @color-link-selected;
|
|
|
|
}
|
|
|
|
}
|
2023-02-04 02:01:56 +00:00
|
|
|
|
|
|
|
// Scroll indicator used by TOC and page tools.
|
|
|
|
.mixin-vector-scroll-indicator() {
|
2023-02-07 22:14:45 +00:00
|
|
|
// Add extra padding for the fade scrollable indicator.
|
|
|
|
padding-bottom: @height-scroll-indicator - @padding-vertical-dropdown-menu-item;
|
|
|
|
|
2023-03-28 20:22:36 +00:00
|
|
|
&::after {
|
2023-02-07 22:14:45 +00:00
|
|
|
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
|
|
|
|
}
|
2023-02-04 02:01:56 +00:00
|
|
|
}
|
2023-04-18 21:57:55 +00:00
|
|
|
|
|
|
|
.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-desktop ) {
|
|
|
|
padding-left: @padding-horizontal-page-container-desktop;
|
|
|
|
padding-right: @padding-horizontal-page-container-desktop;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ( min-width: @min-width-desktop-wide ) {
|
|
|
|
padding-left: @padding-horizontal-page-container-desktop-wide;
|
|
|
|
padding-right: @padding-horizontal-page-container-desktop-wide;
|
|
|
|
}
|
|
|
|
}
|
2023-06-21 20:13:22 +00:00
|
|
|
|
|
|
|
.mixin-vector-dropdown-content-flip() {
|
|
|
|
// Flip dropdown horizontal alignment
|
|
|
|
left: auto;
|
|
|
|
right: 0;
|
|
|
|
}
|