forked from openedx/frontend-app-learner-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.scss
More file actions
225 lines (192 loc) · 4.9 KB
/
Copy pathindex.scss
File metadata and controls
225 lines (192 loc) · 4.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
.dropdown-menu-collapse {
width: 100vw;
position: absolute;
left: 0;
}
.learner-variant-header {
a {
// needed to make the link not resize the header
border-bottom: 2px solid transparent;
}
.course-link {
border-bottom: 2px solid !important;
}
.course-link:hover {
border-bottom: inherit !important;
}
}
.nav-small-menu {
>* {
justify-content: flex-start !important;
border-radius: 0 !important;
border-top: 1px solid #ddd !important;
&::after {
content: '\00BB';
padding-left: 10px;
}
}
}
.logo {
// copy from legacy dashboard
height: 40px;
}
// ─── Same as LMS: logo shrink-0 | nav flex:1 + center | secondary auto ───────
.site-header-desktop .nav-container {
display: flex;
align-items: center;
.logo {
flex: 0 0 auto;
}
.main-nav {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
min-width: 0;
}
// Push secondary menu to the far right
.secondary-menu-container {
flex: 0 0 auto;
margin-left: auto;
}
}
// Hide the logged-in username label; keep avatar + caret visible.
// The button renders: <Avatar> {username text} <CaretIcon>
// font-size: 0 collapses the raw text node; restore sizes explicitly.
.site-header-desktop .secondary-menu-container .btn-outline-primary {
font-size: 0;
gap: 0.25rem;
// Avatar span — both inline-style and class-based sizing use em, so fix with px + !important
.avatar {
width: 1.5rem !important;
height: 1.5rem !important;
// AvatarIcon SVG also carries an inline style with em-based size — must override
svg {
width: 100% !important;
height: 100% !important;
}
}
// Caret — direct child SVG of the button (not inside .avatar)
>svg {
width: 0.75rem;
height: 0.75rem;
}
}
// ─────────────────────────────────────────────────────────────────────────────
// ─── Navigation link styling overrides ───────────────────────────────────────
.site-header-desktop .main-nav {
.nav-link {
display: inline-flex;
align-items: center;
gap: 0.375rem;
padding: 5px 10px !important;
margin: 0.25rem 0.125rem;
font-size: 0.9rem;
font-weight: 500 !important;
letter-spacing: 0.01em !important;
text-decoration: none !important;
border-radius: 8px;
color: #374151;
}
.nav-link:hover,
.nav-link:focus {
background: #D1FAE5;
color: #059669;
font-weight: 600 !important;
}
.nav-link:has(.lw-search-wrapper):hover {
background: none;
color: inherit;
}
.nav-link.active,
.expanded .nav-link {
background: #D1FAE5;
color: #059669;
font-weight: 600 !important;
}
.lw-nav-icon {
width: 1rem;
height: 1rem;
flex-shrink: 0;
}
}
// ─────────────────────────────────────────────────────────────────────────────
// Nav icon (direct child of .nav-link)
.lw-nav-icon {
width: 1rem;
height: 1rem;
flex-shrink: 0;
}
// Search input in the header secondary slot (before bell icon)
// Scoped to override shared frontend-component-header pill defaults.
.site-header-desktop .lw-search-wrapper {
box-sizing: border-box;
display: inline-flex;
align-items: center;
gap: 8px;
width: 233px;
height: 40px;
padding: 8px 12px;
margin-right: 0.5rem;
border-radius: 6px;
border: 1px solid #E2E8F0;
background: #F8FAFC;
opacity: 1;
transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
&:focus-within {
border-color: #059669;
background: #fff;
box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.16);
.lw-search-icon {
color: #059669;
}
}
.lw-search-icon {
position: static;
flex-shrink: 0;
width: 18px;
height: 18px;
color: #64748B;
pointer-events: none;
}
.lw-search-icon path {
stroke-width: 1.7px;
}
.lw-search-input {
flex: 1;
min-width: 0;
width: auto;
height: 21px;
border: none;
border-radius: 0;
padding: 0;
margin: 0;
background: transparent;
outline: none;
font-size: 14px;
line-height: 21px;
letter-spacing: 0;
color: #64748B;
&:focus {
border: none;
background: transparent;
}
&::placeholder {
font-family: inherit;
font-weight: 400;
font-size: 14px;
line-height: 21px;
letter-spacing: 0;
color: #64748B;
opacity: 1;
}
&::-webkit-search-decoration,
&::-webkit-search-cancel-button {
-webkit-appearance: none;
}
}
}
.lw-search-item:hover {
background: none !important;
}