2021-02-02 10:04:37 +00:00
|
|
|
@import '../variables.less';
|
2019-10-25 20:46:51 +00:00
|
|
|
@import 'mediawiki.mixins.less';
|
2018-11-26 17:54:19 +00:00
|
|
|
|
2014-08-07 11:38:34 +00:00
|
|
|
/* Variants and Actions */
|
2020-05-07 16:51:46 +00:00
|
|
|
.vector-menu-dropdown {
|
2014-08-07 11:38:34 +00:00
|
|
|
direction: ltr;
|
|
|
|
float: left;
|
|
|
|
cursor: pointer;
|
|
|
|
position: relative;
|
2017-07-20 03:55:37 +00:00
|
|
|
line-height: 1.125em;
|
2014-08-07 11:38:34 +00:00
|
|
|
|
2022-02-21 15:42:10 +00:00
|
|
|
.vector-menu-heading {
|
2020-06-12 01:17:24 +00:00
|
|
|
color: @color-base--subtle;
|
2019-10-24 17:44:35 +00:00
|
|
|
position: relative;
|
|
|
|
display: block;
|
2022-05-12 20:17:03 +00:00
|
|
|
box-sizing: border-box;
|
2022-06-06 21:39:57 +00:00
|
|
|
height: 100%;
|
2021-06-30 19:52:44 +00:00
|
|
|
|
2019-10-24 17:44:35 +00:00
|
|
|
&:after {
|
|
|
|
content: '';
|
2020-07-24 00:50:31 +00:00
|
|
|
background-image: url( images/arrow-down.svg );
|
2019-10-24 17:44:35 +00:00
|
|
|
background-position: 100% 50%;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
position: absolute;
|
|
|
|
top: unit( 10 / @font-size-tabs / @font-size-browser, em );
|
|
|
|
right: 8px;
|
|
|
|
bottom: 0;
|
|
|
|
width: unit( 16 / @font-size-tabs / @font-size-browser, em );
|
2020-04-15 16:30:22 +00:00
|
|
|
// Modify the color of the image from the default #202122 to approx. #404244 to match the text.
|
|
|
|
opacity: 0.84;
|
2017-11-07 21:50:43 +00:00
|
|
|
}
|
2014-08-07 11:38:34 +00:00
|
|
|
|
2019-10-24 17:44:35 +00:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2019-09-26 21:12:01 +00:00
|
|
|
color: @color-base;
|
2017-11-07 21:50:43 +00:00
|
|
|
|
2018-05-24 23:43:22 +00:00
|
|
|
&:after {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
2017-11-07 21:50:43 +00:00
|
|
|
}
|
2017-07-20 20:50:23 +00:00
|
|
|
}
|
2014-08-07 11:38:34 +00:00
|
|
|
|
2020-06-11 21:02:04 +00:00
|
|
|
// The menu itself.
|
2021-01-28 22:08:36 +00:00
|
|
|
.vector-menu-content {
|
2019-09-26 21:12:01 +00:00
|
|
|
background-color: @background-color-base;
|
2019-10-02 00:11:37 +00:00
|
|
|
list-style: none none;
|
2018-05-24 23:43:22 +00:00
|
|
|
// Match the width of the dropdown "heading" (the tab)
|
|
|
|
min-width: 100%;
|
|
|
|
position: absolute;
|
|
|
|
top: 2.5em;
|
2021-03-24 14:01:04 +00:00
|
|
|
left: -@border-width-base;
|
2018-05-24 23:43:22 +00:00
|
|
|
margin: 0;
|
2019-09-28 07:25:09 +00:00
|
|
|
border: @border-width-base @border-style-base @border-color-base;
|
2018-05-24 23:43:22 +00:00
|
|
|
padding: 0;
|
|
|
|
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
|
|
|
text-align: left;
|
2018-11-26 17:54:19 +00:00
|
|
|
opacity: 0;
|
|
|
|
visibility: hidden;
|
2022-05-13 19:41:15 +00:00
|
|
|
transition-property: opacity;
|
|
|
|
transition-duration: 100ms;
|
2020-04-02 16:50:46 +00:00
|
|
|
z-index: @z-index-menu;
|
2018-05-24 23:43:22 +00:00
|
|
|
}
|
2017-11-19 10:15:11 +00:00
|
|
|
|
2021-08-30 22:27:15 +00:00
|
|
|
// Hide and show menu content based off checked status.
|
2021-01-28 22:08:36 +00:00
|
|
|
.vector-menu-checkbox:checked ~ .vector-menu-content {
|
2018-11-26 17:54:19 +00:00
|
|
|
opacity: 1;
|
|
|
|
visibility: visible;
|
2018-05-24 23:43:22 +00:00
|
|
|
}
|
2014-08-07 11:38:34 +00:00
|
|
|
|
2021-02-08 23:10:21 +00:00
|
|
|
ul {
|
|
|
|
// display list style images introduced in typography.less.
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
|
2018-05-24 23:43:22 +00:00
|
|
|
li {
|
2021-07-22 21:20:15 +00:00
|
|
|
padding: 0;
|
2018-05-24 23:43:22 +00:00
|
|
|
margin: 0;
|
|
|
|
text-align: left;
|
|
|
|
line-height: 1em;
|
2014-08-07 11:38:34 +00:00
|
|
|
|
2018-05-24 23:43:22 +00:00
|
|
|
a {
|
2021-07-22 21:20:15 +00:00
|
|
|
padding: 0.625em;
|
2019-09-26 21:12:01 +00:00
|
|
|
color: @color-link;
|
2018-05-24 23:43:22 +00:00
|
|
|
display: block;
|
|
|
|
white-space: nowrap;
|
|
|
|
cursor: pointer;
|
2021-06-30 19:52:44 +00:00
|
|
|
|
2022-04-14 16:27:31 +00:00
|
|
|
span:not( .mw-ui-icon ) {
|
2021-06-30 19:52:44 +00:00
|
|
|
font-size: @font-size-tabs;
|
|
|
|
}
|
2018-05-24 23:43:22 +00:00
|
|
|
}
|
2019-09-30 07:36:32 +00:00
|
|
|
}
|
2014-08-07 11:38:34 +00:00
|
|
|
|
2019-09-30 07:36:32 +00:00
|
|
|
.selected a,
|
|
|
|
.selected a:visited {
|
|
|
|
color: @color-link-selected;
|
|
|
|
text-decoration: none;
|
2018-05-24 23:43:22 +00:00
|
|
|
}
|
2014-08-07 11:38:34 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 16:34:14 +00:00
|
|
|
// Invisible checkbox covering the dropdown menu handle
|
2020-06-11 21:02:04 +00:00
|
|
|
.vector-menu-checkbox {
|
2017-06-16 16:34:14 +00:00
|
|
|
cursor: pointer;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2020-04-02 16:50:46 +00:00
|
|
|
z-index: @z-index-menu-checkbox;
|
2017-06-16 16:34:14 +00:00
|
|
|
opacity: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
// Hide the checkbox completely in browsers that don't support :checked
|
|
|
|
display: none;
|
|
|
|
|
2018-05-24 23:43:22 +00:00
|
|
|
:not( :checked ) > & {
|
|
|
|
// When the browser supports :checked, display it
|
|
|
|
display: block;
|
|
|
|
}
|
2021-08-26 19:47:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.vector-menu-dropdown-noicon {
|
2022-02-21 15:42:10 +00:00
|
|
|
.vector-menu-heading {
|
2021-08-26 19:47:02 +00:00
|
|
|
// `padding-top` needs to scale with font-size.
|
|
|
|
padding-top: 1.25em;
|
|
|
|
padding-left: 8px;
|
|
|
|
padding-right: unit( 24 / @font-size-tabs / @font-size-browser, em );
|
|
|
|
font-size: @font-size-tabs;
|
|
|
|
font-weight: normal;
|
|
|
|
}
|
2018-05-24 23:43:22 +00:00
|
|
|
|
2021-08-13 20:56:51 +00:00
|
|
|
// Add focus state to legacy menu dropdown buttons (i.e. p-variants, p-cactions)
|
2022-02-21 15:42:10 +00:00
|
|
|
.vector-menu-checkbox:focus + .vector-menu-heading {
|
2018-05-24 23:43:22 +00:00
|
|
|
// Simulate browser focus ring
|
|
|
|
outline: dotted 1px; // Firefox style
|
|
|
|
outline: auto -webkit-focus-ring-color; // Webkit style
|
|
|
|
}
|
2017-06-16 16:34:14 +00:00
|
|
|
}
|