2022-09-01 16:58:56 +00:00
|
|
|
// Note vector-feature-language-in-header-enabled class is not used here as that class
|
2022-07-06 14:53:26 +00:00
|
|
|
// only applies to main page.
|
2022-10-17 20:09:53 +00:00
|
|
|
// This must be limited to vector-page-titlebar as the mw-portlet-lang class is shared with
|
2022-07-06 14:53:26 +00:00
|
|
|
// the language portlet that can display in the sidebar.
|
2022-10-17 20:09:53 +00:00
|
|
|
.vector-page-titlebar .mw-portlet-lang {
|
2022-05-12 20:17:03 +00:00
|
|
|
box-sizing: border-box;
|
2022-07-25 20:41:39 +00:00
|
|
|
flex-shrink: 0;
|
2021-05-03 13:48:46 +00:00
|
|
|
|
2022-06-21 09:19:14 +00:00
|
|
|
// If there are no languages and JavaScript is not enabled there is no fallback so we hide
|
|
|
|
// the button altogether.
|
2023-06-21 20:13:22 +00:00
|
|
|
.client-nojs & .mw-portlet-lang-heading-0 {
|
2024-01-09 14:46:11 +00:00
|
|
|
display: none;
|
2022-06-21 09:19:14 +00:00
|
|
|
}
|
|
|
|
|
2023-06-26 16:54:44 +00:00
|
|
|
.vector-dropdown-label {
|
2021-02-08 23:10:21 +00:00
|
|
|
// Prevent select of span text "X languages"
|
|
|
|
user-select: none;
|
2023-03-07 17:30:13 +00:00
|
|
|
// Set opacity to `1` on language button (it applies to more menu because of label color).
|
|
|
|
opacity: @opacity-base;
|
2021-07-16 15:32:42 +00:00
|
|
|
|
2021-12-01 19:49:12 +00:00
|
|
|
// T291286: Temporarily use progressive ULS style
|
2023-06-12 22:22:33 +00:00
|
|
|
&.cdx-button--action-progressive.cdx-button--weight-quiet::after {
|
2024-06-04 22:00:07 +00:00
|
|
|
mask-image: url( ./images/arrow-down-progressive.svg );
|
2024-08-29 20:24:31 +00:00
|
|
|
background-color: @color-progressive;
|
2023-06-12 22:22:33 +00:00
|
|
|
opacity: @opacity-base;
|
2021-12-01 19:49:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-26 16:54:44 +00:00
|
|
|
.vector-dropdown-checkbox:active + .vector-dropdown-label {
|
2023-04-27 20:39:40 +00:00
|
|
|
&.cdx-button--action-progressive.cdx-button--weight-quiet {
|
|
|
|
.vector-icon {
|
2021-12-01 19:49:12 +00:00
|
|
|
filter: brightness( 0 ) invert( 1 );
|
|
|
|
}
|
|
|
|
|
2023-03-28 20:22:36 +00:00
|
|
|
&::after {
|
2023-04-27 20:39:40 +00:00
|
|
|
// Invert arrow color
|
2024-01-09 14:46:11 +00:00
|
|
|
background-image: url( ./images/arrow-down-invert.svg );
|
2021-12-01 19:49:12 +00:00
|
|
|
}
|
|
|
|
}
|
2021-02-01 22:56:31 +00:00
|
|
|
}
|
|
|
|
|
2023-06-26 16:54:44 +00:00
|
|
|
.vector-dropdown-content {
|
2021-02-01 23:13:58 +00:00
|
|
|
// align borders of open menu align with button
|
2022-05-12 20:17:03 +00:00
|
|
|
box-sizing: border-box;
|
2021-02-05 02:14:21 +00:00
|
|
|
max-height: 65vh;
|
2022-02-06 02:24:47 +00:00
|
|
|
overflow: auto;
|
2023-06-21 20:13:22 +00:00
|
|
|
.mixin-vector-dropdown-content-flip();
|
2021-05-03 13:48:46 +00:00
|
|
|
|
2021-02-05 02:14:21 +00:00
|
|
|
li a {
|
|
|
|
font-size: inherit;
|
|
|
|
}
|
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
|
|
|
}
|
2022-12-19 15:57:48 +00:00
|
|
|
|
2023-04-27 20:39:40 +00:00
|
|
|
.mw-portlet-lang-heading-empty {
|
|
|
|
.mixin-vector-arrowed-dropdown-toggle();
|
|
|
|
}
|
|
|
|
|
2022-12-19 15:57:48 +00:00
|
|
|
// styles for less prominent Language button (without label) to be used for non-content pages (see T316559)
|
2023-06-26 16:54:44 +00:00
|
|
|
.mw-portlet-lang-heading-empty + .vector-dropdown-content {
|
2022-12-19 15:57:48 +00:00
|
|
|
min-width: 300px;
|
|
|
|
|
|
|
|
.mw-portlet-empty-language-selector-body {
|
|
|
|
padding: 20px;
|
2023-10-19 07:40:51 +00:00
|
|
|
border-bottom: @border-style-base @border-width-base @border-color-subtle;
|
2023-04-23 13:48:55 +00:00
|
|
|
color: @color-subtle;
|
2022-12-19 15:57:48 +00:00
|
|
|
}
|
|
|
|
}
|
2021-02-01 22:56:31 +00:00
|
|
|
}
|
2021-02-04 02:23:19 +00:00
|
|
|
|
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;
|
|
|
|
}
|
2022-11-17 23:12:52 +00:00
|
|
|
|
|
|
|
.mw-interlanguage-selector {
|
2023-04-27 20:39:40 +00:00
|
|
|
.mixin-vector-arrowed-dropdown-toggle();
|
2022-11-17 23:12:52 +00:00
|
|
|
}
|
2023-01-31 19:21:41 +00:00
|
|
|
|
|
|
|
// Hide the "Add languages" on pages which are not action=view where there are 0 languages
|
2023-06-26 16:54:44 +00:00
|
|
|
.vector-dropdown > .mw-portlet-lang-heading-0 {
|
2023-01-31 19:21:41 +00:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2023-07-07 15:40:31 +00:00
|
|
|
// IMPORTANT: Since dropdowns are visibility: hidden, it is important if ULS has been enabled
|
|
|
|
// and taken over the menu, that we set the dropdown to display none to avoid impacting the
|
|
|
|
// initial render. Language lists can be long (on some pages +200 links) so avoid having to
|
|
|
|
// consider them in the render at all costs! In future, we may want to reconsider this component
|
|
|
|
// and potentially use Minerva's fallback - where languages are inside the footer, but that's
|
|
|
|
// a change for another day!
|
|
|
|
.client-js .mw-portlet-lang .vector-dropdown-content {
|
|
|
|
display: none;
|
|
|
|
|
|
|
|
// ... since ULS is an optional dependency it may not be installed.
|
|
|
|
.vector-uls-disabled& {
|
|
|
|
display: inherit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 19:21:41 +00:00
|
|
|
// Show it on view pages where there are 0 languages so user can add languages (JavaScript required)
|
2023-08-08 16:00:02 +00:00
|
|
|
.client-js .action-view .vector-dropdown {
|
|
|
|
> .mw-portlet-lang-heading-0 {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-interlanguage-selector-empty:checked ~ .vector-dropdown-content {
|
|
|
|
display: inherit;
|
|
|
|
}
|
2023-01-31 19:21:41 +00:00
|
|
|
}
|