-
Notifications
You must be signed in to change notification settings - Fork 205
/
index.scss
executable file
·388 lines (328 loc) · 8.56 KB
/
index.scss
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
@import "~@edx/brand/paragon/fonts";
@import "~@edx/brand/paragon/variables";
@import "~@edx/paragon/scss/core/core";
@import "~@edx/brand/paragon/overrides";
@import "~@edx/frontend-component-footer/dist/footer";
@import "~@edx/frontend-component-header/dist/index";
#root {
display: flex;
flex-direction: column;
min-height: 100vh;
main {
flex-grow: 1;
}
header {
flex: 0 0 auto;
.logo {
display: block;
box-sizing: content-box;
position: relative;
top: 0.1em;
height: 1.75rem;
margin-right: 1rem;
img {
display: block;
height: 100%;
}
}
}
footer {
flex: 0;
}
}
.nav-underline-tabs {
margin: 0 0 -1px;
.nav-link {
border-bottom: 4px solid transparent;
border-top: 4px solid transparent;
color: $gray-700;
// temporary until we can remove .btn class from dropdowns
border-left: 0;
border-right: 0;
border-radius: 0;
&:hover,
&:focus,
&.active {
font-weight: $font-weight-normal;
color: $primary-500;
border-bottom-color: $primary-500;
}
}
}
.pgn__menu-select .pgn__menu-select-popup {
position: static;
}
.sequence-container {
display: flex;
flex-direction: column;
flex-grow: 1;
margin-bottom: 4rem;
width: 100%;
margin-right: auto;
margin-left: auto;
}
.sequence {
@media (min-width: map-get($grid-breakpoints, "sm")) {
border: solid 1px #eaeaea;
border-radius: 4px;
}
}
.sequence-navigation {
display: flex;
@media (min-width: map-get($grid-breakpoints, "sm")) {
margin: -1px -1px 0;
}
.btn {
flex-grow: 1;
display: inline-flex;
border-radius: 0;
border: solid 1px #eaeaea;
border-left-width: 0;
position: relative;
font-weight: 400;
padding: 0 0.375rem;
height: 3rem;
justify-content: center;
align-items: center;
color: $gray-500;
white-space: nowrap;
&:hover,
&:focus,
&.active {
color: $gray-700;
}
&:focus {
z-index: 1;
}
&.active {
&:after {
content: "";
position: absolute;
bottom: -1px;
left: 0;
right: 0;
height: 2px;
background: $primary;
}
}
&.complete {
background-color: #eef7e5;
color: $success;
}
&:first-child {
border-left-width: 0;
}
&:last-child {
border-right-width: 0;
}
}
.sequence-navigation-tabs-container {
flex-grow: 1;
flex-shrink: 1;
flex-basis: 100%;
display: flex;
// min-width 0 prevents the flex item from overflowing the parent container
// https://dev.to/martyhimmel/quick-tip-to-stop-flexbox-from-overflowing-peb
min-width: 0;
}
.sequence-navigation-tabs {
.btn {
flex-basis: 100%;
min-width: 2rem;
}
}
.sequence-navigation-dropdown {
.dropdown-menu .btn {
flex-basis: 100%;
min-width: 4rem;
padding-left: 1rem;
padding-right: 1rem;
display: inline-flex;
align-items: center;
justify-content: flex-start;
border-right: 0;
& + .btn {
border-top: 0;
}
.unit-title {
flex-grow: 1;
text-align: left;
overflow: hidden;
min-width: 0;
margin: 0 1rem;
text-overflow: ellipsis;
color: $gray-700;
}
&.active {
.unit-icon {
color: $primary-500;
}
&:after {
content: "";
position: absolute;
bottom: 0px;
left: 0px;
top: 0px;
right: auto;
width: 2px;
height: auto;
background: $primary;
}
}
}
.dropdown-item {
&.active {
// This is un-doing the default react-bootstrap styling for active dropdown-item elements.
background-color: transparent;
}
}
}
.previous-btn,
.next-btn {
border: 1px solid $light-400 !important;
color: $gray-700;
display: inline-flex;
justify-content: center;
align-items: center;
@media (max-width: -1 + map-get($grid-breakpoints, "sm")) {
padding-top: 1rem;
padding-bottom: 1rem;
}
@media (min-width: map-get($grid-breakpoints, "sm")) {
min-width: fit-content;
padding-left: 2rem;
padding-right: 2rem;
}
}
.previous-btn {
border-left-width: 0;
margin-left: 0;
@media (min-width: map-get($grid-breakpoints, "sm")) {
border-left-width: 1px;
border-top-left-radius: 4px;
}
}
.next-btn {
border-left-width: 1px;
border-right-width: 0;
@media (min-width: map-get($grid-breakpoints, "sm")) {
border-top-right-radius: 4px;
border-right-width: 1px;
}
}
}
.unit-container {
padding-top: 0;
padding-bottom: 2rem;
max-width: 1024px;
margin-left: auto;
margin-right: auto;
@media (min-width: map-get($grid-breakpoints, "sm")) {
padding-left: $grid-gutter-width;
padding-right: $grid-gutter-width;
}
@media (min-width: 830px) {
padding-left: 40px;
padding-right: 40px;
}
}
.unit-iframe-wrapper {
margin-top: 0;
// Some XBlocks (such as xblock-drag-and-drop-v2) rely on the viewport width
// to determine their layout on mobile. This is problematic because the
// viewport width may not be the same as the width of the iframe. To fix this,
// here we compensate for the padding of the parent div with "container-xl"
// class to ensure that the viewport width is the same as the width of the
// iframe.
margin-left: -$grid-gutter-width * .5;
margin-right: -$grid-gutter-width * .5;
margin-bottom: 2rem;
@media (min-width: 830px) {
margin: 0 -40px 2rem;
}
}
#unit-iframe {
width: 100%;
border: none;
display: block;
}
.unit-navigation {
display: flex;
justify-content: center;
max-width: 640px;
margin: 0 auto;
.previous-button,
.next-button {
white-space: nowrap;
border-radius: 4px;
&:focus:before {
border-radius: 6px;
}
}
.next-button {
flex-basis: 75%;
}
.previous-button {
flex-basis: 25%;
}
}
// This class forces any modals using 'modal-lti' as their dialogClassName to take up the whole
// window (retaining padding around the edge). Bootstrap modals don't have a full-screen
// size like this. Because of the hack below around react-focus-on's div, it would be better long-term to pull this into Paragon and perhaps call it "modal-full" or something like that.
.modal-lti {
height: 100%;
max-width: 100% !important;
// I don't like this. We need to set a height of 100% on a div created by react-focus-on, a
// package we use in our Modal. That div has no class name or ID, so instead we're uniquely
// identifying it by based on a unique attribute it has which its siblings don't share.
> div[data-focus-lock-disabled="false"] {
height: 100%;
}
// Along with setting the height of modal-content's parent div from react-focus-on, we need to
// set modal-content's height as well to get the modal to expand to full-screen height.
.modal-content {
height: 100%;
}
}
.greyed-out {
opacity: 0.3;
}
.locked-overlay {
opacity: 0.3;
pointer-events: none;
&.grades {
overflow: hidden;
max-height: 852px;
@media screen and (min-width: 992px) {
max-height: 920px;
}
}
}
.raised-card {
border: 0 !important;
box-shadow: 0 .0625rem .125rem rgba(0, 0, 0, .2) !important;
}
.icon-hover {
&:hover {
color: $primary-500 !important;
background-color: $light-300 !important;
}
}
// Import component-specific sass files
@import "courseware/course/celebration/CelebrationModal.scss";
@import "courseware/course/sidebar/sidebars/notifications/NotificationIcon.scss";
@import "courseware/course/sequence/lock-paywall/LockPaywall.scss";
@import "shared/streak-celebration/StreakCelebrationModal.scss";
@import "courseware/course/content-tools/calculator/calculator.scss";
@import "courseware/course/content-tools/contentTools.scss";
@import "course-home/dates-tab/timeline/Day.scss";
@import "generic/upgrade-notification/UpgradeNotification.scss";
@import "generic/upsell-bullets/UpsellBullets.scss";
@import "course-home/outline-tab/widgets/ProctoringInfoPanel.scss";
@import "src/course-home/outline-tab/widgets/FlagButton.scss";
@import "course-home/progress-tab/course-completion/CompletionDonutChart.scss";
@import "course-home/progress-tab/grades/course-grade/GradeBar.scss";
@import "courseware/course/course-exit/CourseRecommendations";
@import "product-tours/newUserCourseHomeTour/NewUserCourseHomeTourModal.scss";
@import "course-home/courseware-search/courseware-search.scss";
@import "course-tabs/course-tabs-navigation.scss";