2021-05-26 23:23:53 +00:00
|
|
|
@import '../../common/variables.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`.
|
|
|
|
@padding-horizontal-user-links: 12px;
|
|
|
|
|
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;
|
2021-05-26 23:23:53 +00:00
|
|
|
|
2021-06-02 22:57:43 +00:00
|
|
|
.vector-user-menu-more {
|
2021-07-22 21:20:15 +00:00
|
|
|
font-size: @font-size-user-links;
|
|
|
|
|
2021-06-02 22:57:43 +00:00
|
|
|
.vector-menu-content-list {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
li {
|
2021-07-22 21:20:15 +00:00
|
|
|
margin: 0;
|
2021-06-02 22:57:43 +00:00
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
a {
|
2021-08-26 19:47:02 +00:00
|
|
|
color: @color-base;
|
2021-06-02 22:57:43 +00:00
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Below tablet threshold, all menu items except the notification icons will collapse into the user menu
|
|
|
|
// This ensures a max of 4 icons on small screen sizes (i.e. search, 2 notification icons and the user avatar)
|
|
|
|
&.user-links-collapsible-item {
|
|
|
|
display: none;
|
|
|
|
|
2022-06-23 21:33:47 +00:00
|
|
|
@media ( min-width: @min-width-tablet ) {
|
2021-06-02 22:57:43 +00:00
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-07-22 21:20:15 +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-08-31 22:58:44 +00:00
|
|
|
|
|
|
|
#pt-userpage-2 {
|
|
|
|
max-width: unit( 155 / @font-size-browser / @font-size-base, em );
|
|
|
|
|
|
|
|
span {
|
|
|
|
.text-overflow( @visible: false );
|
|
|
|
}
|
|
|
|
|
|
|
|
// T287522#7295558: Increase the max-width of the username when viewport
|
|
|
|
// allows for it.
|
2022-06-23 21:33:47 +00:00
|
|
|
@media ( min-width: @min-width-desktop-wide ) {
|
2021-08-31 22:58:44 +00:00
|
|
|
max-width: unit( 200 / @font-size-browser / @font-size-base, em );
|
|
|
|
}
|
|
|
|
}
|
2021-06-02 22:57:43 +00:00
|
|
|
}
|
|
|
|
|
2021-05-07 21:56:29 +00:00
|
|
|
.vector-user-menu {
|
|
|
|
|
2021-08-05 17:58:47 +00:00
|
|
|
// Override ".emptyPortlet" class to ensure user menu isn't hidden
|
|
|
|
&.emptyPortlet {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
2021-08-12 19:44:38 +00:00
|
|
|
.vector-menu-heading {
|
2021-08-26 19:47:02 +00:00
|
|
|
.mw-ui-icon ~ span {
|
|
|
|
.mixin-screen-reader-text();
|
|
|
|
}
|
2021-05-26 23:23:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.vector-menu-content {
|
2021-05-07 21:56:29 +00:00
|
|
|
min-width: 200px;
|
2021-08-31 22:58:44 +00:00
|
|
|
max-width: unit( 350px / @font-size-browser, em );
|
2021-05-26 23:23:53 +00:00
|
|
|
top: 100%;
|
2022-05-16 13:04:28 +00:00
|
|
|
// stylelint-disable-next-line plugin/no-unsupported-browser-features
|
2021-05-26 23:23:53 +00:00
|
|
|
left: unset;
|
|
|
|
right: 0;
|
2021-07-22 21:20:15 +00:00
|
|
|
border-radius: 2px;
|
|
|
|
// T285786: Box shadow per design spec
|
|
|
|
box-shadow: 0 2px 2px 0 rgba( 0, 0, 0, 0.25 );
|
|
|
|
|
|
|
|
.user-links-collapsible-item {
|
2022-06-23 21:33:47 +00:00
|
|
|
@media ( min-width: @min-width-tablet ) {
|
2021-07-22 21:20:15 +00:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2021-05-26 23:23:53 +00:00
|
|
|
}
|
|
|
|
|
2021-08-26 19:47:02 +00:00
|
|
|
.mw-list-item {
|
|
|
|
width: 100%;
|
2021-05-26 23:23:53 +00:00
|
|
|
}
|
|
|
|
|
2021-07-22 21:20:15 +00:00
|
|
|
.vector-menu-content-item,
|
2021-08-26 19:47:02 +00:00
|
|
|
.mw-list-item > a {
|
2021-07-22 21:20:15 +00:00
|
|
|
// Overrides .mw-ui-icon's `min-height` property to have a computed
|
|
|
|
// min-height of 32px. This matches the design spec of having an icon that
|
|
|
|
// is 20px in height + 6px of top padding + 6px of bottom padding. Using
|
|
|
|
// min-height instead of vertical padding allows menu items without an
|
|
|
|
// icon to still be 32px in height.
|
|
|
|
min-height: unit( 32px / @font-size-browser, em );
|
|
|
|
// Overrides .mw-ui-icon's `display: inline-block` property so that
|
|
|
|
// the text can be vertically centered.
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
// Overrides .mw-ui-icon's `padding: 0` property so that the text is not
|
|
|
|
// at the edge of the menu. Apply the padding on the link element instead
|
|
|
|
// of the li element to maximize the click target.
|
|
|
|
padding: 0 @padding-horizontal-user-links;
|
2021-08-26 19:47:02 +00:00
|
|
|
color: @color-base;
|
2021-07-22 21:20:15 +00:00
|
|
|
text-decoration: none;
|
2021-06-30 19:52:44 +00:00
|
|
|
|
2022-04-14 16:27:31 +00:00
|
|
|
// Update menu item text styles
|
|
|
|
span:not( .mw-ui-icon ) {
|
2021-07-22 21:20:15 +00:00
|
|
|
font-size: @font-size-user-links;
|
2021-08-31 22:58:44 +00:00
|
|
|
.text-overflow( @visible: false );
|
2021-08-03 21:16:43 +00:00
|
|
|
// Overrides .mw-ui-icon's `line-height: 0` property so that the text is
|
|
|
|
// visible when not overflowing.
|
2022-01-07 00:40:27 +00:00
|
|
|
line-height: @line-height-nav-personal;
|
2021-06-30 19:52:44 +00:00
|
|
|
}
|
2021-05-07 21:56:29 +00:00
|
|
|
|
2021-07-22 21:20:15 +00:00
|
|
|
// Set hover color for "Create account" and "Login" menu items.
|
2021-06-02 19:48:25 +00:00
|
|
|
&:hover {
|
|
|
|
background-color: @background-color-secondary;
|
|
|
|
}
|
2021-07-22 21:20:15 +00:00
|
|
|
}
|
2021-05-26 23:23:53 +00:00
|
|
|
|
2021-07-22 21:20:15 +00:00
|
|
|
.vector-menu-content-item-login {
|
2022-07-19 12:08:01 +00:00
|
|
|
border-bottom: @border-width-base @border-style-base @border-color-base;
|
2021-07-22 21:20:15 +00:00
|
|
|
}
|
2021-06-04 12:47:39 +00:00
|
|
|
|
2021-07-22 21:20:15 +00:00
|
|
|
.vector-user-menu-anon-editor {
|
2021-07-27 22:44:02 +00:00
|
|
|
padding: 4px @padding-horizontal-user-links;
|
2021-07-22 21:20:15 +00:00
|
|
|
color: @colorGray5;
|
|
|
|
font-size: @font-size-user-links;
|
2021-06-04 12:47:39 +00:00
|
|
|
|
2021-07-22 21:20:15 +00:00
|
|
|
p {
|
|
|
|
margin: 0;
|
2021-05-26 23:23:53 +00:00
|
|
|
}
|
2021-08-25 20:16:33 +00:00
|
|
|
|
|
|
|
a:before {
|
|
|
|
content: '@{msg-parentheses-start}';
|
|
|
|
color: @colorGray5;
|
|
|
|
}
|
|
|
|
|
|
|
|
a:after {
|
|
|
|
content: '@{msg-parentheses-end}';
|
|
|
|
color: @colorGray5;
|
|
|
|
}
|
2021-05-26 23:23:53 +00:00
|
|
|
}
|
2021-07-22 21:20:15 +00:00
|
|
|
|
|
|
|
.vector-menu-content-item-logout {
|
2022-07-19 12:08:01 +00:00
|
|
|
border-top: @border-width-base @border-style-base @border-color-base;
|
2021-07-22 21:20:15 +00:00
|
|
|
}
|
2022-03-04 01:52:44 +00:00
|
|
|
|
|
|
|
#pt-tmpuserpage {
|
|
|
|
padding: 4px @padding-horizontal-user-links;
|
|
|
|
color: @colorGray5;
|
|
|
|
font-size: @font-size-user-links;
|
|
|
|
}
|
2021-05-26 23:23:53 +00:00
|
|
|
}
|
2021-05-07 21:56:29 +00:00
|
|
|
|
2022-02-21 15:42:10 +00:00
|
|
|
.vector-user-menu-logged-out .vector-menu-heading {
|
2021-06-24 19:13:20 +00:00
|
|
|
&:before {
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
content: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-21 15:42:10 +00:00
|
|
|
.vector-user-menu-logged-in .vector-menu-heading {
|
2021-07-21 21:59:25 +00:00
|
|
|
// FIXME: Ideally this variable should be accessible from mediawiki.skin.variables
|
|
|
|
// Remove it when we can.
|
|
|
|
@icon-padding-md: unit( 12 / @font-size-browser, em );
|
|
|
|
@icon-arrow-size: unit( 12px / @font-size-browser, em );
|
|
|
|
padding-right: @icon-padding-md + @icon-arrow-size;
|
2021-06-24 19:13:20 +00:00
|
|
|
|
|
|
|
&:before {
|
|
|
|
color: #54595d;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
background-position: 100% 0%;
|
2021-07-21 21:59:25 +00:00
|
|
|
top: @icon-padding-md + ( @icon-arrow-size / 2 );
|
|
|
|
right: @icon-arrow-size;
|
2021-06-24 19:13:20 +00:00
|
|
|
}
|
|
|
|
}
|
2021-05-24 22:02:26 +00:00
|
|
|
}
|