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';
|
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`.
|
2023-06-12 22:22:33 +00:00
|
|
|
// Applies to links in the overflow menu that do not have the .cdx-button class.
|
2022-08-04 13:14:11 +00:00
|
|
|
@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-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 {
|
2023-06-26 16:54:44 +00:00
|
|
|
.vector-dropdown-content {
|
2023-06-21 20:13:22 +00:00
|
|
|
.mixin-vector-dropdown-content-flip();
|
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
|
|
|
}
|
|
|
|
|
|
|
|
@media ( min-width: @min-width-desktop ) {
|
|
|
|
// Right margin to separate overflow menu from dropdown
|
|
|
|
margin-right: 8px;
|
|
|
|
|
2023-05-12 17:54:39 +00:00
|
|
|
// Separate menu items inside overflow menu
|
2022-11-15 17:42:43 +00:00
|
|
|
.vector-menu-content-list {
|
|
|
|
column-gap: 8px;
|
|
|
|
}
|
2022-07-22 19:20:55 +00:00
|
|
|
}
|
2021-05-26 23:23:53 +00:00
|
|
|
|
2023-05-12 17:54:39 +00:00
|
|
|
@media ( max-width: @max-width-tablet ) {
|
|
|
|
// Only apply 8px spacing to normal links (i.e. Create account, User page)
|
|
|
|
// Links with button classes will have a larger touch area
|
|
|
|
// and therefore dont need additional spacing
|
2023-06-12 22:22:33 +00:00
|
|
|
a:not( .mw-echo-notifications-badge ):not( .cdx-button ) {
|
2023-05-12 17:54:39 +00:00
|
|
|
margin: 0 8px;
|
|
|
|
}
|
2022-08-04 13:14:11 +00:00
|
|
|
}
|
|
|
|
|
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
|
|
|
|
*/
|
2023-06-26 16:54:44 +00:00
|
|
|
.vector-user-menu-logged-in .vector-dropdown-label {
|
2023-04-27 20:39:40 +00:00
|
|
|
.mixin-vector-arrowed-dropdown-toggle();
|
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;
|
|
|
|
|
2023-03-28 20:22:36 +00:00
|
|
|
a::before {
|
2023-02-01 23:38:44 +00:00
|
|
|
content: '@{msg-parentheses-start}';
|
|
|
|
}
|
|
|
|
|
2023-03-28 20:22:36 +00:00
|
|
|
a::after {
|
2023-02-01 23:38:44 +00:00
|
|
|
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
|
2023-04-23 13:48:55 +00:00
|
|
|
color: @color-link;
|
2022-08-04 13:14:11 +00:00
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|