mediawiki-skins-Vector/resources/common/components/Menu.less
Clare Ming dc0b679bfa Consolidate user links into personal dropdown menu for logged users.
Pull personal menu items except for user page link into a consolidated dropdown menu based on feature flag using Vector hooks. Add consolidate user links feature flag for logged in/out users. Update styles for personal toolbar. Add logic to template to show legacy toolbar or consolidated toolbar based on feature flag variables.

Bug: T276561
Depends-On: If4e143aada711d210ae45d33b97a6be0685b6a41
Change-Id: I1c305d89bece147a6f1b478441119c3169abfbdd
2021-05-06 12:49:39 -07:00

72 lines
1.7 KiB
Plaintext

@import '../variables.less';
@import 'mediawiki.mixins.less';
/* Personal Menu */
#p-personal .vector-menu-content-list {
display: flex;
flex-wrap: wrap;
flex-grow: 1;
justify-content: flex-end;
align-items: baseline;
}
/* Personal Menu */
.mw-portlet {
// Hidden by default, but displayed by certain menus
// e.g. MenuPortal
h3 {
display: none;
}
ul {
list-style: none none;
margin: 0;
}
li {
margin-left: 0.75em;
// `padding-top` instead of `margin-top` necessary for
// anonymous user icon position below
padding-top: 0.5em;
line-height: @line-height-nav-personal;
}
}
/* Icon for registered user names & anonymous message */
#pt-anonuserpage,
#pt-userpage a,
#p-user-page a {
background-image: url( images/user-avatar.svg );
background-position: @background-position-nav-personal-icon;
background-repeat: no-repeat;
background-size: @background-size-nav-personal-icon @background-size-nav-personal-icon;
// Same as `#p-personal li` above
padding-top: 0.5em !important; // stylelint-disable-line declaration-no-important
padding-left: 16px !important; // stylelint-disable-line declaration-no-important
}
#p-user-page a {
// Overrides directly above: padding-left: 16px !important; which does not allow for enough space between the
// personal icon asset and the user page link in the personal toolbar.
padding-left: 25px !important; // stylelint-disable-line declaration-no-important
}
#pt-userpage {
padding-top: 0 !important; // stylelint-disable-line declaration-no-important
a {
display: inline-block;
}
}
/* Show anonymous "Not logged in" text in gray */
#pt-anonuserpage {
color: #54595d;
}
#p-user-page .vector-menu-content-list {
#ca-userpage {
padding-top: 0;
}
}