mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-11 07:26:10 +00:00
5e15edb9a2
Bug: T345766 Change-Id: I2ae1d1668849a04520b73ac04fe16e1ff7f22fa6
106 lines
2.2 KiB
Plaintext
106 lines
2.2 KiB
Plaintext
/**
|
|
* Dropdown container
|
|
*/
|
|
.vector-dropdown {
|
|
position: relative;
|
|
|
|
/**
|
|
* Dropdown toggle buttons. Doesn't apply to icon only buttons like the main menu dropdown.
|
|
* - language variants, Actions menus
|
|
* - more menu, user menu
|
|
* - ULS button in sticky header
|
|
*/
|
|
.vector-dropdown-label:not( .cdx-button--icon-only ) {
|
|
.mixin-vector-arrowed-dropdown-toggle();
|
|
}
|
|
|
|
/**
|
|
* Invisible checkbox covering the dropdown toggle button.
|
|
*/
|
|
.vector-dropdown-checkbox {
|
|
cursor: pointer;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: @z-index-stacking-1;
|
|
opacity: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
|
|
// Hide and show menu content based off checked status.
|
|
&:checked ~ .vector-dropdown-content {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
height: auto;
|
|
}
|
|
}
|
|
|
|
.vector-dropdown-content {
|
|
position: absolute;
|
|
top: 100%;
|
|
left: -@border-width-base;
|
|
opacity: 0;
|
|
height: 0;
|
|
visibility: hidden;
|
|
overflow: hidden;
|
|
margin: 0;
|
|
padding: 4px 0;
|
|
z-index: @z-index-dropdown;
|
|
background-color: @background-color-base;
|
|
border: @border-width-base @border-style-base @border-color-base;
|
|
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
|
transition-property: opacity;
|
|
transition-duration: @transition-duration-base;
|
|
// TODO Add consistent min/max values for dropdowns in T316055
|
|
width: max-content;
|
|
max-width: 200px;
|
|
}
|
|
}
|
|
|
|
.vector-pinnable-element,
|
|
.vector-dropdown-content {
|
|
.vector-menu-heading {
|
|
.mixin-vector-dropdown-menu-item();
|
|
.mixin-vector-menu-heading();
|
|
}
|
|
|
|
.mw-list-item {
|
|
padding: 0;
|
|
}
|
|
|
|
.mw-list-item a {
|
|
// Mirror styles from Dropdown.less
|
|
.mixin-vector-dropdown-menu-item();
|
|
color: @color-link;
|
|
}
|
|
|
|
> *:not( :last-child ) {
|
|
// Apply bottom border to every children of dropdown contents and pinnable elements except the last
|
|
border-bottom: @border-width-base @border-style-base #eaecf0;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Dropdown menu items.
|
|
*/
|
|
.vector-dropdown .mw-list-item {
|
|
padding: 0;
|
|
|
|
a {
|
|
.mixin-vector-dropdown-menu-item();
|
|
|
|
// The link is a mw-selflink in the case of temporary users.
|
|
&:not( .mw-selflink ) {
|
|
color: @color-link;
|
|
}
|
|
}
|
|
|
|
.selected a,
|
|
.selected a:visited {
|
|
color: @color-link-selected;
|
|
text-decoration: none;
|
|
}
|
|
}
|