mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-09-23 18:29:49 +00:00
Always collapse Echo alert on "wide" headers
Bug: T301583 Change-Id: Ib4baab3ab814a79f45d8d19cfe4e499307852d52
This commit is contained in:
parent
79cde24aff
commit
5ef40f2f73
|
@ -368,7 +368,9 @@ abstract class SkinVector extends SkinMustache {
|
|||
$userMenuData[ 'html-after-portal' ] .= $this->getLogoutHTML();
|
||||
}
|
||||
|
||||
$moreItems = substr_count( $userMoreData['html-items'], '<li' );
|
||||
return [
|
||||
'is-wide' => $moreItems > 3,
|
||||
'data-user-more' => $userMoreData,
|
||||
'data-user-menu' => $userMenuData
|
||||
];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="vector-user-links">
|
||||
<div class="vector-user-links{{#is-wide}} vector-user-links-wide{{/is-wide}}">
|
||||
{{#data-user-more}}{{>Menu}}{{/data-user-more}}
|
||||
{{#data-user-menu}}{{>Menu}}{{/data-user-menu}}
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
@import '../resources/common/variables.less';
|
||||
|
||||
/** Mixin for collapsing the Echo new messages alert */
|
||||
.echo-alert-collapse() {
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.vector-user-links {
|
||||
.vector-menu-content-list {
|
||||
.mw-echo-alert {
|
||||
|
@ -17,11 +25,15 @@
|
|||
|
||||
@media ( max-width: @width-breakpoint-desktop-wide ) {
|
||||
.mw-echo-alert {
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
.echo-alert-collapse();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If the user link is wide, always collapse
|
||||
.vector-user-links-wide .vector-menu-content-list {
|
||||
.mw-echo-alert {
|
||||
.echo-alert-collapse();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue