modules.scss 14.3 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
/* modules.less */

// The home for small tweaks to modules that don't require
// changes drastic enough to pull in the full module css
// and replace it completely
// Plus some misc. odds and ends

select {
    width: auto;
}

12
13
14
15
16
17
// Feedback module
.path-mod-feedback .feedback_form .col-md-9,
.path-mod-feedback .feedback_form .col-md-3,
.path-mod-feedback .feedback_form .col-md-3 label {
    width: 100%;
}
18

19
20
21
22
23
.path-mod-feedback .feedback_form .col-md-9 {
    margin-left: 1rem;
    margin-bottom: -2rem;
}

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
// Forum module

.path-mod-forum .forumsearch {
    input,
    .helptooltip {
        margin: 0 3px;
    }
}

.path-mod-forum .forumheaderlist,
.path-mod-forum .forumheaderlist td {
    border: none;
}

.path-mod-forum {
    .forumheaderlist {
        thead .header,
        tbody .discussion td {
            white-space: normal;
            vertical-align: top;
            padding-left: 0.5em;
            padding-right: 0.5em;
        }

        thead .header {
            white-space: normal;
            vertical-align: top;
        }

        thead .header.replies {
            text-align: center;
        }
56

57
58
59
        thead .header.lastpost {
            text-align: right;
        }
60

61
        thead .header th,
62
        tbody .discussion td {
63
64
65
66
67
68
            &.discussionsubscription {
                width: 16px;
                padding-left: 0.5em;
                padding-right: 0.5em;
            }
        }
69

70
        .discussion {
71
72
73
            .author,
            .replies,
            .lastpost {
74
75
                white-space: normal;
            }
76

77
78
79
80
            .discussionsubscription,
            .replies {
                text-align: center;
            }
81

82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
            .topic,
            .discussionsubscription,
            .topic.starter,
            .picture,
            .author,
            .replies,
            .lastpost {
                vertical-align: top;
            }
        }
    }
}

.forumpost {
    @extend .card;
    padding: 6px;
98

99
100
101
    .header {
        margin-bottom: 3px;
    }
102

103
104
    .picture img {
        margin: 3px;
105

106
107
108
109
110
        &.userpicture {
            margin-left: 3px;
            margin-right: 10px;
        }
    }
111

112
113
114
115
116
    .content {
        .posting.fullpost {
            margin-top: 8px;
        }
    }
117

118
119
120
121
122
123
    .row {
        .topic,
        .content-mask,
        .options {
            margin-left: 48px;
        }
124

125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
        &.side {
            clear: both;
        }
    }
}

.forumpost .row .left {
    width: 48px;
}

.forumpost .options .commands {
    margin-left: 0;
}

.forumpost .subject {
    font-weight: bold;
}

// Override hardcoded forum modules styling
.forumsearch input[type=text] {
145
    margin-bottom: 0 !important;
146
147
148
149
150
151
152
153
154
155
156
}

#page-mod-forum-discuss .discussioncontrols {
    width: auto;
    margin: 0;
}

#page-footer {
    border-top: 2px solid $table-border-color;
}

157
158
.maincalendar .calendarmonth td,
.maincalendar .calendarmonth th {
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
    border: 1px dotted $table-border-color;
}

.path-grade-report-grader h1 {
    text-align: inherit;
}

#page-mod-chat-gui_basic input#message {
    max-width: 100%;
}

#page-mod-data-view #singleimage {
    width: auto;
}

.path-mod-data form {
    margin-top: 10px;
}

.template_heading {
    margin-top: 10px;
}

.breadcrumb-button {
    float: right;
    margin-top: 4px;
}

.breadcrumb-button .singlebutton {
    float: left;
    margin-left: 4px;
}

.navbar-fixed-top,
.navbar-fixed-bottom {
    z-index: 4030;
}

.ie .row-fluid .desktop-first-column {
    margin-left: 0;
}
200

201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
.langmenu form {
    margin: 0;
}
// contributed by Paul Hibbitts, see http://msdn.microsoft@mixin com/en-us/library/ie/jj583807(v=vs.85).aspx
canvas {
    -ms-touch-action: auto;
}

div#dock {
    display: none;
}

// Choice module

.path-mod-choice {
    .horizontal  .choices {
        margin: 0;
218

219
220
221
222
223
        .option {
            display: inline-block;
            padding: 10px;
        }
    }
224

225
226
227
228
229
230
231
    .results .data {
        white-space: normal;
    }
}

// Lesson module

232
/** General styles (scope: all of lesson) **/
233
234
235
.path-mod-lesson .invisiblefieldset.fieldsetfix {
    display: block;
}
236
237
238
239
240
241
242
243
244
245
246

.path-mod-wiki .wiki_headingtitle,
.path-mod-wiki .midpad,
.path-mod-wiki .wiki_headingtime {
    text-align: inherit;
}

.path-mod-wiki .wiki_contentbox {
    width: 100%;
}

247
248
249
250
251
// Dropdown styling.
.dropdown-menu {
    margin-top: 11px;
}

252
253
254
255
// Survey module

.path-mod-survey {
    .surveytable {
256
257
258
259
260
261
262
263
264
265
266
        > tbody > tr:nth-of-type(odd) {
            background-color: $table-bg;
        }

        > tbody > tr:nth-of-type(even) {
            background-color: $table-bg-accent;
        }

        .rblock label {
            text-align: center;
        }
267
    }
268
269
270
271
272
273
274

    .resultgraph,
    .reportsummary,
    .studentreport,
    .reportbuttons,
    .centerpara {
        text-align: center;
275
276
277
278
279
280
281
282
283
284
285
286
    }
}

.nav .caret {
    margin-left: 4px;
}

// Dividers
.nav {
    .divider {
        overflow: hidden;
        width: 0;
287
288
289
        //      height: $navbarHeight;
        //      border-left: 1px solid $navbarBackground;
        //     border-right: 1px solid $navbarBackgroundHighlight;
290
291
292
293
    }
}
//.navbar-inverse {
//    .nav {
294
295
296
297
298
//        .divider {
//            border-left-color: $navbarInverseBackground;
//            border-right-color: lighten($navbarInverseBackground, 25%);
//        }
//    }
299
300
301
302
303
//}

// Usermenu
.usermenu {
    .login {
304
        line-height: 2.25rem;
305

306
        a {
307
            color: $link-color;
308

309
310
            &:hover,
            &:focus {
311
                color: $link-hover-color;
312
313
314
315
316
                text-decoration: underline;
            }
        }
    }

317
    .moodle-actionmenu {
318
319
320
321
322
323
        .toggle-display {
            display: block;
            opacity: 1;
            color: $dropdown-link-color;
            line-height: 40px;
            height: 40px;
324

325
326
327
328
329
330
331
            &:hover {
                color: $dropdown-link-hover-color;
            }

            .userbutton {
                height: 40px;
                line-height: 40px;
332
333

                .avatars {
334
335
336
337
338
339
340
341
342
343
344
345
                    display: inline-block;
                    height: 36px;
                    width: 36px;
                    vertical-align: middle;
                    margin-right: 6px;
                    margin-left: 6px;

                    .avatar,
                    img {
                        display: block;
                    }
                }
346

347
348
349
350
351
                .usertext {
                    display: inline-block;
                    vertical-align: middle;
                    line-height: 1em;
                    color: inherit;
352

353
354
355
356
                    .meta,
                    .role {
                        display: block;
                        font-size: 12px;
357

358
359
360
361
                        .value {
                            font-weight: bold;
                        }
                    }
362

363
364
365
366
367
368
369
370
371
372
373
374
375
                    .role {
                        font-weight: bold;
                    }
                }
            }

            // Hide caret when JS is disabled.
            .caret {
                display: none;
            }
        }
    }
}
376

377
378
379
380
381
@include media-breakpoint-down(sm) {
    .usertext {
        display: none;
    }
}
382

383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
.jsenabled {
    .usermenu {
        .moodle-actionmenu {
            .toggle-display {
                display: block;

                &.textmenu {
                    padding-left: 8px;
                    padding-right: 8px;
                }

                // Show caret when JS is enabled.
                .caret {
                    display: inline-block;
                    position: relative;
                    top: 9px;
                }
            }

            > .menubar {
                display: block;
404
                margin: 0;
405
            }
406

407
408
            > .menu {
                min-width: 160px;
409

410
411
                .filler {
                    display: block;
412

413
414
415
416
417
418
                    @include nav-divider();
                }
            }

            &.show {
                background-color: $dropdown-link-active-bg;
419

420
421
422
423
                .menu {
                    padding: 5px 0;
                    margin: 2px 0 0;
                    background-clip: padding-box;
424

425
426
427
                    &:before {
                        content: '';
                        display: inline-block;
428
429
                        border-left: 7px solid transparent;
                        border-right: 7px solid transparent;
430
431
432
433
434
                        border-bottom: 7px solid #ccc;
                        border-bottom-color: $dropdown-border-color;
                        position: absolute;
                        top: -7px;
                    }
435

436
437
438
                    &:after {
                        content: '';
                        display: inline-block;
439
440
                        border-left: 6px solid transparent;
                        border-right: 6px solid transparent;
441
442
443
444
445
446
447
448
449
450
451
                        border-bottom: 6px solid $dropdown-bg;
                        position: absolute;
                        top: -6px;
                    }

                    a {
                        border-radius: 0;

                        &:focus {
                            text-decoration: none;
                        }
452

453
454
                        &:hover {
                            text-decoration: none;
455

456
                            @include gradient-y($dropdown-link-hover-bg, darken($dropdown-link-hover-bg, 5%));
457
458
                        }
                    }
459

460
461
462
                    &.align-tr-br {
                        margin-top: 2px;
                    }
463
464
465

                    @include box-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
                }
466
467
468
469
470
471
472
            }
        }
    }
}

.usermenu {
    float: right;
473

474
475
476
477
478
    > .moodle-actionmenu {
        > .menu {
            &:before {
                right: 9px;
            }
479

480
481
482
483
            &:after {
                right: 10px;
            }
        }
484

485
486
487
488
489
        > .menubar li a {
            text-align: right;
        }
    }
}
490

491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
&.userloggedinas .usermenu .userbutton .avatars {
    .avatar {
        &.current {
            left: 16px;
        }
    }
}

.userloggedinas .usermenu .userbutton .avatars {
    .avatar {
        &.current {
            position: relative;
            top: 4px;
            left: 4px;
            width: 20px;
            height: 20px;
            margin-top: 11px;
            margin-bottom: -34px;
            border: 1px solid #fff;
            border-radius: 50%;
511
            box-shadow: -2px -2px 16px rgba(0, 0, 0, 0.25);
512
        }
513

514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
        img {
            width: inherit;
            height: inherit;
        }
        overflow: hidden;
    }
}

// Quiz module

// Question navigation block.
.path-mod-quiz #mod_quiz_navblock {
    .qnbutton {
        text-decoration: none;
        font-size: 14px;
        line-height: 20px;
        font-weight: normal;
        background-color: $body-color;
        background-image: none;
        height: 40px;
        width: 30px;
        border-radius: 3px;
        border: 0;
        overflow: visible;
        margin: 0 6px 6px 0;
    }
540

541
542
543
544
545
    span.qnbutton {
        cursor: default;
        background-color: $input-bg-disabled;
        color: $gray;
    }
546

547
548
549
550
551
552
553
554
555
556
557
    a.qnbutton:hover,
    a.qnbutton:active,
    a.qnbutton:focus {
        text-decoration: underline;
    }

    .qnbutton .thispageholder {
        border: 1px solid;
        border-radius: 3px;
        z-index: 1;
    }
558

559
560
561
    .qnbutton.thispage .thispageholder {
        border-width: 3px;
    }
562

563
564
565
566
567
    .allquestionsononepage .qnbutton.thispage .thispageholder {
        border-width: 1px;
    }

    .qnbutton.flagged .thispageholder {
568
        background: transparent url([[pix:theme|mod/quiz/flag-on]]) 15px 0 no-repeat;
569
570
571
572
    }

    .qnbutton .trafficlight {
        border: 0;
573
        background: $body-color none center / 10px no-repeat scroll;
574
575
576
577
578
579
580
581
582
        height: 20px;
        margin-top: 20px;
        border-radius: 0 0 3px 3px;
    }

    .qnbutton.notyetanswered .trafficlight,
    .qnbutton.invalidanswer .trafficlight {
        background-color: $body-color;
    }
583

584
585
586
    .qnbutton.invalidanswer .trafficlight {
        background-image: url([[pix:theme|mod/quiz/warningtriangle]]);
    }
587

588
589
590
591
    .qnbutton.correct .trafficlight {
        background-image: url([[pix:theme|mod/quiz/checkmark]]);
        background-color: $state-success-text;
    }
592

593
594
595
596
    .qnbutton.blocked .trafficlight {
        background-image: url([[pix:core|t/locked]]);
        background-color: $input-bg-disabled;
    }
597

598
599
600
601
    .qnbutton.notanswered .trafficlight,
    .qnbutton.incorrect .trafficlight {
        background-color: $state-danger-text;
    }
602

603
604
605
606
    .qnbutton.partiallycorrect .trafficlight {
        background-image: url([[pix:theme|mod/quiz/whitecircle]]);
        background-color: $state-warning-text;
    }
607

608
609
610
611
612
613
    .qnbutton.complete .trafficlight,
    .qnbutton.answersaved .trafficlight,
    .qnbutton.requiresgrading .trafficlight {
        background-color: $gray-light;
    }
}
614
615
616
617
618
619
620

/**
 * Assign.
 */
.path-mod-assign [data-region="grade-actions-panel"] [data-region="grade-actions"] .collapse-buttons {
    top: auto;
}
621

622
.path-mod-assign [data-region="grade-panel"] .has-popout {
623
    background-color: $card-bg;
624

625
626
    @include border-radius($card-border-radius);
    border: $card-border-width solid $card-border-color;
627
}
628

629
630
631
.path-mod-assign [data-region="grade-panel"] .popout {
    background-color: $modal-content-bg;
}
632

633
634
635
.path-mod-assign [data-region="grade-panel"] .col-md-3 {
    width: 100%;
}
636

637
638
639
640
.path-mod-assign [data-region="grade-panel"] .popout > .col-md-3 {
    @extend .modal-header;
    font-size: 1.5rem;
}
641

642
643
644
.path-mod-assign [data-region="grade-panel"] [data-region="popout-button"] {
    margin-top: 0.5rem;
}
645

646
647
648
.path-mod-assign [data-region="grade-panel"] .popout [data-region="popout-button"] {
    margin-top: 0;
}
649

650
651
652
653
.path-mod-assign [data-region="grade-panel"] h3 {
    margin: 10px 0;
    line-height: 40px;
}
654

655
656
657
.path-mod-assign [data-region="grading-navigation"] {
    padding: 6px;
}
658

659
660
661
.path-mod-assign [data-region="grade-actions"] {
    padding: 10px;
}
662

663
664
665
.path-mod-assign [data-region="user-info"] .img-rounded {
    margin-top: 0;
}
666

667
668
669
.path-mod-assign [data-region="grading-navigation-panel"] {
    height: 85px;
}
670

671
672
673
674
675
676
677
678
679
680
681
.path-mod-assign [data-region="grading-navigation"] [data-region="input-field"] input {
    width: auto;
    display: inline-block;
}

/**
 * Assign feedback.
 */
.assignfeedback_editpdf_widget * {
    box-sizing: content-box;
}
682

683
684
685
.assignfeedback_editpdf_widget button {
    box-sizing: border-box;
}
686

687
688
689
.assignfeedback_editpdf_widget .commentcolourbutton img {
    border-width: 0;
}
690

691
692
693
694
695
696
697
698
.assignfeedback_editpdf_widget .label {
    @extend .tag;
    @extend .tag-info;
}

.assignfeedback_editpdf_menu {
    padding: 0;
}
699