Register meta data to allow Vector to handle display of this menu item

- Adjusts CSS to defer button/icon rendering to skins that support button
and icons e.g. Vector

Depends-On: Ib518858e06549f252d73d57fd4768f446cc561b9
Bug: T289630
Change-Id: Ie9e30af5468aea9803d77c9a36e480ba2b2e86a0
This commit is contained in:
jdlrobson
2021-09-01 09:35:51 -07:00
committed by Jdlrobson
parent e7cd7ccc3e
commit 9f92d7e759
2 changed files with 12 additions and 1 deletions

View File

@@ -226,7 +226,11 @@ class UniversalLanguageSelectorHooks {
'uls' => [
'text' => Language::fetchLanguageName( $langCode ),
'href' => '#',
'class' => 'uls-trigger',
// Skin meta data to allow skin (e.g. Vector) to add icons
'icon' => 'wikimedia-language',
// Skin meta data to allow skin (e.g. Vector) to convert to button.
'button' => true,
'link-class' => [ 'uls-trigger' ],
'active' => true
]
] + $personal_urls;

View File

@@ -24,6 +24,13 @@
// Let the SVG image fit without cropping or stretch
background-size: contain;
padding-left: 24px;
// Certain skins upgrade this to mw-ui-button. Background and padding should not apply.
// e.g. Modern Vector
&.mw-ui-button {
background: none;
padding-left: 12px;
}
}
#pt-uls {