2021-05-26 23:23:53 +00:00
|
|
|
@import '../../common/variables.less';
|
2022-07-22 19:20:55 +00:00
|
|
|
@import '../../common/mixins.less';
|
2021-08-31 22:58:44 +00:00
|
|
|
@import 'mediawiki.mixins.less';
|
2022-08-04 13:14:11 +00:00
|
|
|
@import 'mediawiki.ui/variables.less';
|
2021-05-24 22:02:26 +00:00
|
|
|
|
2021-07-22 21:20:15 +00:00
|
|
|
@font-size-user-links: unit( 14 / @font-size-browser, em ); // Equals `0.875em`.
|
2022-08-04 13:14:11 +00:00
|
|
|
// Applies to links in the overflow menu that do not have the .mw-ui-button class.
|
|
|
|
@overflow-link-margin: 0 8px;
|
2021-07-22 21:20:15 +00:00
|
|
|
|
2022-07-22 19:20:55 +00:00
|
|
|
/**
|
|
|
|
* Container that holds both the horizontal menu and dropdown menus.
|
|
|
|
*/
|
2021-05-24 22:02:26 +00:00
|
|
|
.vector-user-links {
|
|
|
|
display: flex;
|
2021-05-07 21:56:29 +00:00
|
|
|
align-items: center;
|
|
|
|
position: relative;
|
2021-06-02 22:57:43 +00:00
|
|
|
justify-content: flex-end;
|
|
|
|
flex-shrink: 1;
|
2022-07-22 19:20:55 +00:00
|
|
|
|
|
|
|
.mw-ui-button {
|
|
|
|
// FIXME: Overrides mw-ui-button's `display: inline-block` property so that
|
|
|
|
// the text in the button is vertically centered. `.mw-ui-button` sets a
|
|
|
|
// min-height to the button, but should also vertically center the
|
|
|
|
// button's children.
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2021-06-02 22:57:43 +00:00
|
|
|
}
|
|
|
|
|
2022-07-22 19:20:55 +00:00
|
|
|
.mw-list-item {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
}
|
2021-05-07 21:56:29 +00:00
|
|
|
|
2022-07-22 19:20:55 +00:00
|
|
|
/**
|
|
|
|
* Both logged-in and logged-out dropdown menus.
|
|
|
|
*/
|
|
|
|
.vector-user-menu {
|
|
|
|
.vector-menu-content {
|
|
|
|
left: auto;
|
|
|
|
right: 0;
|
2023-01-10 17:28:17 +00:00
|
|
|
|
|
|
|
.vector-feature-page-tools-disabled & {
|
|
|
|
min-width: 200px;
|
|
|
|
}
|
2022-07-22 19:20:55 +00:00
|
|
|
}
|
2021-08-05 17:58:47 +00:00
|
|
|
|
2023-02-01 23:38:44 +00:00
|
|
|
// Used to hide collapsible items inside the dropdown menu
|
|
|
|
// as well as the dropdown menu itself when the menu is empty
|
|
|
|
&.user-links-collapsible-item,
|
2022-07-22 19:20:55 +00:00
|
|
|
.user-links-collapsible-item {
|
|
|
|
@media ( min-width: @min-width-tablet ) {
|
|
|
|
display: none;
|
2021-05-26 23:23:53 +00:00
|
|
|
}
|
2022-07-22 19:20:55 +00:00
|
|
|
}
|
|
|
|
}
|
2021-05-26 23:23:53 +00:00
|
|
|
|
2022-07-22 19:20:55 +00:00
|
|
|
/**
|
|
|
|
* Horizontal links menu - logged in and logged out.
|
|
|
|
*/
|
2022-11-15 19:34:12 +00:00
|
|
|
.vector-user-links .mw-portlet-vector-user-menu-overflow {
|
2023-02-16 19:41:35 +00:00
|
|
|
font-size: @font-size-user-links;
|
|
|
|
|
2022-07-22 19:20:55 +00:00
|
|
|
.vector-menu-content-list {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2022-11-15 17:42:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// TODO: Simplify button, icon button and link styling with T323244
|
|
|
|
@media ( min-width: @min-width-desktop ) {
|
|
|
|
// Right margin to separate overflow menu from dropdown
|
|
|
|
margin-right: 8px;
|
|
|
|
|
|
|
|
// Separate icon buttons inside the overflow menu
|
|
|
|
.vector-menu-content-list {
|
|
|
|
column-gap: 8px;
|
|
|
|
}
|
2022-07-22 19:20:55 +00:00
|
|
|
}
|
2021-05-26 23:23:53 +00:00
|
|
|
|
2022-08-04 13:14:11 +00:00
|
|
|
// Add margin to links that don't have the .mw-ui-button or related icon classes.
|
|
|
|
a:not( .mw-ui-button ):not( .mw-echo-notifications-badge ) {
|
|
|
|
margin: 0 8px;
|
|
|
|
}
|
|
|
|
|
2022-07-22 19:20:55 +00:00
|
|
|
.user-links-collapsible-item {
|
2022-08-04 18:13:19 +00:00
|
|
|
@media ( max-width: @max-width-mobile ) {
|
2022-07-22 19:20:55 +00:00
|
|
|
display: none;
|
2021-05-26 23:23:53 +00:00
|
|
|
}
|
2022-07-22 19:20:55 +00:00
|
|
|
}
|
|
|
|
}
|
2021-05-26 23:23:53 +00:00
|
|
|
|
2022-07-22 19:20:55 +00:00
|
|
|
/**
|
|
|
|
* Logged-in dropdown menu
|
|
|
|
*/
|
|
|
|
.vector-user-menu-logged-in {
|
2023-02-16 19:41:35 +00:00
|
|
|
.vector-menu-heading:after {
|
|
|
|
.mixin-vector-menu-heading-arrow();
|
2022-07-22 19:20:55 +00:00
|
|
|
}
|
|
|
|
}
|
2021-06-04 12:47:39 +00:00
|
|
|
|
2022-07-22 19:20:55 +00:00
|
|
|
/**
|
|
|
|
* Dropdown menu items- Special treatment for special links.
|
|
|
|
*/
|
2023-02-01 23:38:44 +00:00
|
|
|
#p-user-menu-anon-editor .vector-menu-heading {
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
a:before {
|
|
|
|
content: '@{msg-parentheses-start}';
|
|
|
|
}
|
|
|
|
|
|
|
|
a:after {
|
|
|
|
content: '@{msg-parentheses-end}';
|
|
|
|
}
|
|
|
|
}
|
2021-06-04 12:47:39 +00:00
|
|
|
|
2022-08-04 13:14:11 +00:00
|
|
|
//User-page link in personal (overflow) menu.
|
2022-07-22 19:20:55 +00:00
|
|
|
#pt-userpage-2 {
|
|
|
|
max-width: unit( 155 / @font-size-browser / @font-size-user-links, em );
|
2021-06-24 19:13:20 +00:00
|
|
|
|
2023-02-03 00:35:07 +00:00
|
|
|
a:not( .mw-selflink ) {
|
2022-08-04 13:14:11 +00:00
|
|
|
// T312157 Override redlink (.new) color for non-existant userpage
|
|
|
|
color: @color-primary;
|
|
|
|
}
|
|
|
|
|
2022-07-22 19:20:55 +00:00
|
|
|
span {
|
|
|
|
.text-overflow( @visible: false );
|
2021-06-24 19:13:20 +00:00
|
|
|
}
|
|
|
|
|
2022-07-22 19:20:55 +00:00
|
|
|
// T287522#7295558: Increase the max-width of the username when viewport
|
|
|
|
// allows for it.
|
|
|
|
@media ( min-width: @min-width-desktop-wide ) {
|
|
|
|
max-width: unit( 200 / @font-size-browser / @font-size-user-links, em );
|
2021-06-24 19:13:20 +00:00
|
|
|
}
|
2021-05-24 22:02:26 +00:00
|
|
|
}
|