Fix sticky header language button

- Fixes blank sticky header language button when no languages are present
- Adds arrow to sticky header language button

Bug: T289815
Change-Id: I36dc5fb0aad9c3ca1fced0d46e5167e8707f6731
This commit is contained in:
bwang 2021-09-21 14:56:09 -05:00 committed by Bernard Wang
parent 9afae1fcaf
commit 809a972676
2 changed files with 22 additions and 1 deletions

View File

@ -325,7 +325,7 @@ class SkinVector extends SkinMustache {
*/
private function getStickyHeaderData() {
return [
'data-primary-action' => !$this->shouldHideLanguages() ? $this->getULSButtonData() : '',
'data-primary-action' => !$this->shouldHideLanguages() ? $this->getULSButtonData() : null,
'data-button-start' => [
'href' => '#p-search',
'label' => $this->msg( 'search' ),

View File

@ -68,3 +68,24 @@
#p-lang-btn.mw-portlet-empty {
display: none;
}
#p-lang-btn-sticky-header {
@button-padding: 12px;
@arrow-width: 18px;
position: relative;
padding-right: calc( @button-padding + @arrow-width );
&:after {
content: '';
background-image: url( ../common/images/arrow-down.svg );
background-position: 100% 50%;
background-repeat: no-repeat;
position: absolute;
top: 0;
right: @button-padding;
bottom: 0;
width: @arrow-width;
// Modify the color of the image from the default #202122 to approx. #404244 to match the text.
opacity: 0.84;
}
}