Debian Codegraph @

skins/Vector/resources/skins.vector.styles/components/UserLinks.less

raw
1 /**
2 * UserLinks
3 * All links and menus that appear in the header,
4 * at the top of the page, after the search bar.
5 */
6
7 /**
8 * Top-most container that holds ALL menus in the user links section
9 * (horizontal menus and dropdowns)
10 * Logged-in and logged-out.
11 */
12 .vector-user-links {
13 display: flex;
14 align-items: center;
15 position: relative;
16 justify-content: flex-end;
17 flex-shrink: 1;
18
19 // Spacing for all top-level menu icons.
20 .mw-list-item,
21 .vector-dropdown-label {
22 margin: 0 @spacing-25;
23 }
24 // Reset margins on items inside dropdowns.
25 .vector-dropdown-content .mw-list-item {
26 margin: 0;
27 }
28 }
29
30 /**
31 * Container that holds just the dropdown user menu (displays "..." when logged out).
32 * Logged-in and logged-out.
33 */
34 .vector-user-menu {
35 .vector-dropdown-content {
36 .mixin-vector-dropdown-content-flip();
37 }
38
39 // Used to hide collapsible items inside the dropdown menu
40 // as well as the dropdown menu itself when the menu is empty
41 &.user-links-collapsible-item,
42 .user-links-collapsible-item {
43 @media ( min-width: @min-width-breakpoint-tablet ) {
44 display: none;
45 }
46
47 &--none {
48 display: none;
49 }
50 }
51 }
52
53 /**
54 * Container that holds all menus except the user menu (.vector-user-menu).
55 * Logged-in and logged-out.
56 */
57 .vector-user-links-main {
58 display: flex;
59 align-items: center;
60
61 .vector-menu-content-list {
62 display: flex;
63 align-items: center;
64 font-size: @font-size-small;
65 }
66
67 .user-links-collapsible-item {
68 @media ( max-width: @max-width-breakpoint-mobile ) {
69 display: none;
70 }
71 }
72 }
73
74 /**
75 * Logged-in dropdown user menu.
76 */
77 .vector-user-menu-logged-in .vector-dropdown-label {
78 .mixin-vector-arrowed-dropdown-toggle();
79 }
80
81 /**
82 * Logged-out dropdown user menu items- Special treatment for special links.
83 */
84 #p-user-menu-anon-editor .vector-menu-heading {
85 display: block;
86
87 a::before {
88 content: '@{msg-parentheses-start}';
89 }
90
91 a::after {
92 content: '@{msg-parentheses-end}';
93 }
94 }
95
96 /**
97 * Logged-in user-page link in personal (overflow) menu.
98 */
99 #pt-userpage-2 {
100 max-width: unit( 155 / @font-size-browser / @font-size-small, em );
101 overflow: hidden;
102 text-overflow: ellipsis;
103
104 a:not( .mw-selflink ) {
105 // T312157 Override redlink (.new) color for non-existant userpage
106 color: @color-progressive;
107 }
108
109 span {
110 .text-overflow( @visible: false );
111 }
112
113 // T287522#7295558: Increase the max-width of the username when viewport
114 // allows for it.
115 @media ( min-width: @min-width-breakpoint-desktop-wide ) {
116 max-width: unit( 200 / @font-size-browser / @font-size-small, em );
117 }
118 }