New Vector introduced a new content language selector trigger. This code was hardcoding a behavior that works for compact language links but is not so appropriate for other uses in the skin, which are out of our control. This patch aims to be a minimal change to allow other kinds of behavior without changing the amount of tech debt. This changes the default ULS dialog behavior to match the requirements shown in the task. Compact language links specific behavior is retained but only enabled for the compact language links trigger. The behavior is chosen depending on the value of isUsingStandaloneLanguageButton(). For future changes, I propose that mw-interlanguage-selector class will not have any styles attached to it. Whoever creates the trigger would be in charge of styling it. Ideally that code would also define the positioning and other behavior, but it is less clear how that can be abstracted in a nice and decoupled way. Bug: T276248 Change-Id: I52da6c2f5a1f25d64f322a3c8f6105da3b244b66
37 lines
843 B
Plaintext
37 lines
843 B
Plaintext
@import 'mediawiki.mixins';
|
|
@import 'ext.uls.mixins.less';
|
|
|
|
/* stylelint-disable selector-max-id */
|
|
#p-lang .body ul .uls-trigger,
|
|
#p-lang .pBody ul .uls-trigger {
|
|
background-image: none;
|
|
padding: 0;
|
|
}
|
|
/* stylelint-enable selector-max-id */
|
|
|
|
.mw-interlanguage-selector,
|
|
.mw-interlanguage-selector:active {
|
|
background-image: url( ../images/language-base20.svg );
|
|
background-position: left 4px center;
|
|
background-repeat: no-repeat;
|
|
background-size: 16px;
|
|
margin: 4px 0 8px;
|
|
padding: 4px 8px 4px 26px;
|
|
font-size: 13px;
|
|
font-weight: normal;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.mw-interlanguage-selector.selector-open {
|
|
background-color: #c8ccd1;
|
|
}
|
|
|
|
/*
|
|
* Add caret to the ULS dialog when using the cog in the sidebar.
|
|
* This works together with selector-left and selector-right classes.
|
|
*/
|
|
.interlanguage-uls-menu {
|
|
.caret();
|
|
}
|