Fix alignment for nearby and settings items in menu, and correctly hide when JS is disabled

Removes a `display: inherit` that was causing issues with the alignment of these two items in the menu.  In addition, correctly sets display to none for jsonly-specified list items when client js is disabled and rename the class to make it more specific to the menu items

Note: this will have a visual impact as it is fixing what is currently a visual bug.  The jsonly hiding will also not work with cached content, but since it's currently broken we figured this was acceptable

Bug: T346670
Change-Id: I56d2c4fcba09d199a0fd6aad2f1621509bbfaba5
This commit is contained in:
Steph Toyofuku 2023-12-14 11:03:26 -08:00 committed by Jdlrobson
parent edd1b0652e
commit 5e35d585cf
4 changed files with 7 additions and 9 deletions

View file

@ -130,7 +130,7 @@ class SingleMenuEntry implements IMenuEntry {
* @inheritDoc
*/
public function getCSSClasses(): array {
return $this->isJSOnly ? [ 'jsonly' ] : [];
return $this->isJSOnly ? [ 'skin-minerva-list-item-jsonly' ] : [];
}
/**

View file

@ -7,16 +7,10 @@
.client-js .mw-redirectedfrom,
/* FIXME: Use generic rule for print stylesheets */
.printfooter,
.jsonly {
.printfooter {
display: none;
}
/* TODO: Fix specificity */
.client-js .jsonly {
display: inherit;
}
// currently used to hide talk button
.hidden {
display: none !important;

View file

@ -21,6 +21,10 @@
box-shadow: inset 4px 0 0 0 @box-shadow-color-progressive--focus;
text-decoration: none;
}
.client-nojs & .skin-minerva-list-item-jsonly {
display: none;
}
}
}
}

View file

@ -147,7 +147,7 @@ class GroupTest extends MediaWikiIntegrationTestCase {
]
]
],
'class' => 'jsonly'
'class' => 'skin-minerva-list-item-jsonly'
],
];