2021-02-08 23:10:21 +00:00
|
|
|
// The use of mixins.buttons requires @font-size-base to be defined for this to work in Storybook
|
2021-02-02 10:04:37 +00:00
|
|
|
@import '../../common/variables.less';
|
2021-03-22 22:59:18 +00:00
|
|
|
@import 'mediawiki.mixins.less';
|
2021-02-01 22:56:31 +00:00
|
|
|
|
2021-05-03 13:48:46 +00:00
|
|
|
// TODO: `#p-lang-btn` Can be changed to `.mw-portlet-lang` when languages-in-header is the default.
|
|
|
|
#p-lang-btn {
|
|
|
|
.box-sizing( border-box );
|
|
|
|
height: @height-lang-button;
|
|
|
|
|
2021-03-22 22:59:18 +00:00
|
|
|
.mw-ui-icon:before {
|
|
|
|
// Put icon on correct standard normal state color.
|
|
|
|
opacity: 0.87;
|
|
|
|
}
|
|
|
|
|
2021-02-04 02:23:19 +00:00
|
|
|
.vector-menu-heading {
|
2021-07-16 15:32:42 +00:00
|
|
|
font-size: initial;
|
2021-02-08 23:10:21 +00:00
|
|
|
// reset padding styles in MenuDropdown.less with right padding for arrow.
|
2021-07-16 15:32:42 +00:00
|
|
|
padding-right: 30px;
|
|
|
|
padding-left: 8px;
|
2021-02-08 23:10:21 +00:00
|
|
|
// Prevent select of span text "X languages"
|
|
|
|
user-select: none;
|
2021-03-22 22:59:18 +00:00
|
|
|
// Remove opacity on language button (it applies to more menu because of label color).
|
2021-03-08 19:07:09 +00:00
|
|
|
opacity: 1;
|
2021-07-16 15:32:42 +00:00
|
|
|
// mw-ui-icon resets the button border.
|
|
|
|
border: 1px solid transparent;
|
|
|
|
// center vertically in heading.
|
|
|
|
margin-top: 2px;
|
|
|
|
|
|
|
|
span {
|
|
|
|
// Special treatment for language button, based on Vector font-size
|
|
|
|
font-size: @font-size-base;
|
|
|
|
}
|
2021-02-01 23:13:58 +00:00
|
|
|
|
|
|
|
&:after {
|
|
|
|
top: 0;
|
|
|
|
}
|
2021-02-01 22:56:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.vector-menu-content {
|
|
|
|
top: auto;
|
2021-07-16 15:32:42 +00:00
|
|
|
left: -@border-width-base;
|
2021-03-24 14:01:04 +00:00
|
|
|
right: -@border-width-base;
|
2021-02-01 23:13:58 +00:00
|
|
|
// align borders of open menu align with button
|
2021-03-22 22:59:18 +00:00
|
|
|
.box-sizing( border-box );
|
2021-02-05 02:14:21 +00:00
|
|
|
max-height: 65vh;
|
|
|
|
overflow: scroll;
|
|
|
|
border-top-width: 1px;
|
|
|
|
|
2021-05-03 13:48:46 +00:00
|
|
|
// Adds to the show/hide technique in MenuDropdown.less with
|
|
|
|
// display to prevent rendering and long scrolling on Main page
|
|
|
|
display: none;
|
|
|
|
|
2021-02-05 02:14:21 +00:00
|
|
|
li a {
|
|
|
|
font-size: inherit;
|
|
|
|
}
|
2021-02-01 22:56:31 +00:00
|
|
|
}
|
|
|
|
|
2021-05-03 13:48:46 +00:00
|
|
|
.vector-menu-checkbox:checked ~ .vector-menu-content {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
2021-02-01 22:56:31 +00:00
|
|
|
.after-portlet {
|
2021-02-01 23:13:58 +00:00
|
|
|
// ensure there is a visual separation between the language links and additional links.
|
2021-02-05 02:14:21 +00:00
|
|
|
margin-top: 10px;
|
2021-02-01 22:56:31 +00:00
|
|
|
}
|
|
|
|
}
|
2021-02-04 02:23:19 +00:00
|
|
|
|
2021-02-08 23:10:21 +00:00
|
|
|
// Disable border-radius when dropdown menu open
|
|
|
|
.client-nojs {
|
2021-05-03 13:48:46 +00:00
|
|
|
#p-lang-btn:hover .vector-menu-heading,
|
2021-02-08 23:10:21 +00:00
|
|
|
.vector-menu-checkbox:checked + .vector-menu-heading {
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-02-04 02:23:19 +00:00
|
|
|
// mw-body-header class can be removed when language button is the default.
|
|
|
|
// e.g. upon removal of SkinVector::isLanguagesInHeader
|
2021-05-03 13:48:46 +00:00
|
|
|
.client-js #p-lang-btn {
|
2021-02-04 02:23:19 +00:00
|
|
|
// The `.mw-interlanguage-selector` is toggled off through js if the
|
|
|
|
// `ext.uls.interface` module is not being loaded.
|
|
|
|
.mw-interlanguage-selector {
|
|
|
|
// Remove the ULS language icon provided by ext.uls.compactlinks.less as we
|
|
|
|
// are already providing no-js users an icon.
|
|
|
|
background-image: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
// When the ext.uls.interface module is loaded, we hide the fallback menu and
|
|
|
|
// checkbox.
|
2021-05-07 10:24:30 +00:00
|
|
|
&.vector-menu--hide-dropdown {
|
2021-02-04 02:23:19 +00:00
|
|
|
.vector-menu-checkbox,
|
|
|
|
.vector-menu-content {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-07-26 21:00:38 +00:00
|
|
|
|
|
|
|
// Hides language button with CSS, ensures language button is in DOM for temporary JS hack for interwiki links
|
|
|
|
// Temporary solution to T287206, can be removed when ULS dialog includes interwiki links
|
|
|
|
#p-lang-btn.mw-portlet-empty {
|
|
|
|
display: none;
|
|
|
|
}
|