Scope ULS styles to when language button is in header

Bug: T304468
Change-Id: Iebacb6a7bf3412a6ee76eb5c9fdb9471c02dd16c
This commit is contained in:
bwang 2022-04-05 17:33:25 -05:00
parent 54897659fc
commit 40045c6e0e
2 changed files with 9 additions and 1 deletions

View File

@ -553,6 +553,11 @@ class Hooks {
) ) {
$bodyAttrs['class'] .= ' skin-vector-disable-max-width';
}
$featureManager = VectorServices::getFeatureManager();
if ( $featureManager->isFeatureEnabled( Constants::FEATURE_LANGUAGE_IN_MAIN_PAGE_HEADER ) ) {
$bodyAttrs['class'] .= ' vector-language-in-header-enabled';
}
}
/**

View File

@ -2,7 +2,10 @@
@import '../../common/variables.less';
@import 'mediawiki.mixins.less';
.mw-portlet-lang {
// TODO: `#p-lang-btn` Can be removed after Iebacb6a7bf3412a6ee76eb5c9fdb9471c02dd16c
// has been in prod for 5 days.
#p-lang-btn,
.vector-language-in-header-enabled .mw-portlet-lang {
// FIXME [review whether margin-top is needed] center vertically in heading.
margin-top: 2px;
.box-sizing( border-box );