modules.less 20.9 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
18
19
20
21
22
// Assign
.path-mod-assign #page-content [data-region="grade-panel"] .mform:not(.unresponsive) #id_attemptsettings .fitem {
    .fitemtitle,
    .felement {
        display: table-cell;
        float: none;
        border-top: 1px solid #ddd;
        padding: 8px 0;
    }
}

23
24
25
26
27
28
29
// Feedback module

body.path-mod-feedback #region-main .mform.feedback_form .feedback-item-pagebreak .felement {
    width: 100%;
}

.path-mod-feedback .mform.feedback_form#feedback_viewresponse_form .fitem.feedback_hasvalue:not(.feedback-item-captcha) .felement {
30
    background: #fbfbf1;
31
32
33
    min-height: 1em;
    box-sizing: border-box;
    padding: 3px;
34
    border: 1px solid #ddd;
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
}

.path-mod-feedback .mform.feedback_form .fitem.feedback_hasvalue .fstatic:empty {
    display: inherit;
}

.path-mod-feedback .mform.feedback_form#feedback_edit_form .fitem:hover {
    background: #f5f5f5;
}

.path-mod-feedback .mform.feedback_form#feedback_edit_form .fitem .fitemtitle label {
    width: 100%;
}

.path-mod-feedback .mform.feedback_form#feedback_edit_form .fitem .fitemtitle .itemtitle {
    position: relative;
    width: 100%;
}

.path-mod-feedback .mform.feedback_form#feedback_edit_form .fitem .fitemtitle .itemtitle .itemdd,
.path-mod-feedback .mform.feedback_form#feedback_edit_form .fitem .fitemtitle .itemtitle .itemname {
    float: left;
}

.path-mod-feedback .mform.feedback_form#feedback_edit_form .fitem .fitemtitle .itemtitle .itemactions {
    float: right;
}

63
// Forum module
64

65
66
67
68
69
70
71
.path-mod-forum .forumsearch {
    input,
    .helptooltip {
        margin: 0 3px;
    }
}

72
73
74
75
76
.path-mod-forum .forumheaderlist,
.path-mod-forum .forumheaderlist td {
    border: none;
}

77
78
79
80
.path-mod-forum {
    .forumheaderlist {
        thead .header,
        tbody .discussion td {
81
            white-space: normal;
82
83
84
            vertical-align: top;
            padding-left: 0.5em;
            padding-right: 0.5em;
85
        }
86
87
88
89
90
91
92

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

        thead .header.replies {
93
94
            text-align: center;
        }
95
96
97
98
        thead .header.lastpost {
            text-align: right;
        }
        thead .header th,
99
        tbody .discussion td {
100
101
102
103
104
105
106
            &.discussionsubscription {
                width: 16px;
                padding-left: 0.5em;
                padding-right: 0.5em;
            }
        }
        .discussion {
107
108
109
            .author,
            .replies,
            .lastpost {
110
111
112
113
114
115
116
117
118
119
120
121
122
123
                white-space: normal;
            }
            .discussionsubscription,
            .replies {
                text-align: center;
            }
            .topic,
            .discussionsubscription,
            .topic.starter,
            .author,
            .replies,
            .lastpost {
                vertical-align: top;
            }
124
125
126
127
            .picture {
                margin: 0 20px;
                float: left;
            }
128
129
130
131
132
            .unread {
                img {
                    margin: 0;
                }
            }
133
134
135
136
        }
    }
}

137
138
139
.forumpost {
    .well;
    padding: 6px;
140
141
142
    .header {
        margin-bottom: 3px;
    }
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
    .picture img {
        margin: 3px;
        &.userpicture {
            margin-left: 3px;
            margin-right: 10px;
        }
    }
    .content {
        .posting.fullpost {
            margin-top: 8px;
        }
    }
    .row {
        .topic,
        .content-mask,
        .options {
            margin-left: 48px;
        }
        &.side {
            clear: both;
        }
    }
}

167
.forumpost .row .left {
168
    width: 48px;
169
170
171
172
173
174
175
176
177
178
179
180
}

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

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

// Override hardcoded forum modules styling
.forumsearch input[type=text] {
181
    margin-bottom: 0 !important; /* stylelint-disable-line declaration-no-important */
182
183
}

184
185
186
#page-mod-forum-discuss .discussioncontrols {
    width: auto;
    margin: 0;
187
188
189
190
191
}

#page-footer {
    margin-top: 1em;
    padding: 1em 0;
192
    border-top: 2px solid @tableBorder;
193
194
}

195
196
.maincalendar .calendarmonth td,
.maincalendar .calendarmonth th {
197
    border: 1px dotted @tableBorder;
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
}

.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;
222
    margin-top: 4px;
223
}
224

225
226
227
228
229
.breadcrumb-button .singlebutton {
    float: left;
    margin-left: 4px;
}

230
231
232
233
234
235
.navbar-inverse .logininfo a {
    color: @navbarInverseLinkColor;
}
.navbar-inverse .logininfo a:hover {
    background-color: @navbarInverseLinkBackgroundHover; // "transparent" is default to differentiate :hover/:focus from .active
    color: @navbarInverseLinkColorHover;
236
237
238
239
}

.navbar-fixed-top,
.navbar-fixed-bottom {
240
    z-index: 4030;
241
242
243
}

.ie .row-fluid .desktop-first-column {
244
    margin-left: 0;
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
}
.langmenu form {
    margin: 0;
}
.container-fluid {
    max-width: 1680px;
    margin: 0 auto;
}
// contributed by Paul Hibbitts, see http://msdn.microsoft.com/en-us/library/ie/jj583807(v=vs.85).aspx
canvas {
    -ms-touch-action: auto;
}

div#dock {
    display: none;
}

262
263
// Choice module

264
.path-mod-choice {
265
266
267
    .media-left {
        float: left;
        padding-right: 1em;
268
    }
269
270
271
272

    .horizontal .choices .option {
        display: inline-block;
    }
273
274
}

275
276
// Lesson module

277
278
279
280
281
.path-mod-lesson .firstpageoptions {
    margin: auto;
    min-width: 280px;
    width: 60%;
}
282
283
284
285
286

.path-mod-lesson .centerpadded {
    padding: 5px;
    text-align: center;
}
287

288
289
290
291
/** General styles (scope: all of lesson) **/
.path-mod-lesson .contents,
.path-mod-lesson .standardtable,
.path-mod-lesson .mform .box.contents,
292
293
294
295
296
297
298
299
.path-mod-lesson .invisiblefieldset.fieldsetfix tr {
    text-align: left;
}

.path-mod-lesson #layout-table {
    width: 100%;
}

300
.path-mod-lesson .edit_buttons form,
301
302
303
304
.path-mod-lesson .edit_buttons input {
    display: inline;
}

305
.path-mod-lesson .userinfotable .cell,
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
.path-mod-lesson .userinfotable .userpicture {
    vertical-align: middle;
}

.path-mod-lesson .invisiblefieldset.fieldsetfix {
    display: block;
}

.path-mod-lesson .slideshow {
    overflow: auto;
    padding: 15px;
}

.path-mod-lesson .menu .menuwrapper {
    max-height: 400px;
    overflow: auto;
    vertical-align: top;
    margin-bottom: 10px;
}

.path-mod-lesson .menu ul {
    list-style: none;
328
329
    padding: 5px 0 0 5px;
    margin: 0;
330
331
332
333
334
335
336
337
338
}
.path-mod-lesson .menu ul li {
    padding-bottom: 5px;
}
.path-mod-lesson .skip {
    position: absolute;
    top: -1000em;
    width: 20em;
}
339
.path-mod-lesson .branchbuttoncontainer.horizontal div,
340
341
342
343
344
345
346
347
.path-mod-lesson .branchbuttoncontainer.horizontal form {
    display: inline;
}
.path-mod-lesson .firstpageoptions {
    width: 30%;
    margin-left: 35%;
    margin-top: 1em;
}
348
349
.path-mod-lesson .progress_bar_table,
.path-mod-lesson .progress_bar_completed,
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
.path-mod-lesson .progress_bar_todo {
    padding: 0;
    margin: 0;
}
.path-mod-lesson .progress_bar_token {
    height: 20px;
    width: 5px;
    padding: 0;
    margin: 0;
}
.path-mod-lesson .edit_pages_box .addlinks {
    margin: 0;
    margin-bottom: 1em;
}
.path-mod-lesson .progress_bar_completed {
    background-color: green;
    text-align: right;
    vertical-align: middle;
368
    color: #fff;
369
}
370

371
372
373
.path-mod-lesson .resourcecontent {
    text-align: center;
}
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388

.path-mod-lesson .answeroption .fcheckbox > span {
    position: relative;
    float: left;
}

.path-mod-lesson .answeroptiongroup .fgroup > span {
    position: relative;
    width: 100%;
}

.path-mod-lesson .answeroption .fcheckbox input,
.path-mod-lesson .answeroptiongroup input {
    position: absolute;
    top: 2px;
389
    margin-top: 0;
390
391
392
393
394
395
396
397
398
399
400
    left: 0;
}

.path-mod-lesson .answeroption .fcheckbox label,
.path-mod-lesson .mform .fitem.answeroptiongroup fieldset.fgroup label {
    padding-left: 20px;
    float: left;
}

.path-mod-lesson .answeroption .felement label p:last-child,
.path-mod-lesson .answeroptiongroup .felement label p:last-child {
401
    margin-bottom: 0;
402
}
403
404
405
406
.path-mod-lesson .answeroption .fradio label p,
.path-mod-lesson .answeroption .fcheckbox label p {
    display: inline;
}
407
408
409
410

/**
 * Style for view.php
 **/
411
412
413
#page-mod-lesson-view .password-form .submitbutton {
    display: inline;
}
414
415
416
#page-mod-lesson-view .branchbuttoncontainer .singlebutton input[type="submit"] {
    white-space: normal;
}
417
418
.path-mod-lesson .reviewessay {
    width: 40%;
419
420
    border: 1px solid #ddd;
    background-color: #eee;
421
}
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439

/* Countdown timer. */
#lesson-timer {
    text-align: center;
}

.path-mod-lesson .essayungraded {
    background-color: #efcfcf;
}

.path-mod-lesson .essaygraded {
    background-color: #efefcf;
}

.path-mod-lesson .essaysent {
    background-color: #cfefcf;
}

440
441
442
443
.path-mod-wiki .wiki_headingtitle,
.path-mod-wiki .midpad,
.path-mod-wiki .wiki_headingtime {
    text-align: inherit;
444
}
445
446
447

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

450
451
452
453
454
455
456
// Dropdown styling.
.dropdown-menu {
    > li > a {
        padding: 3px 20px 3px 8px;
    }
}

457
458
459
460
// Survey module

.path-mod-survey {
    .surveytable {
461
462
463
464
465
466
467
468
469
        > tbody > tr:nth-of-type(odd) {
            background-color: @tableBackground;
        }
        > tbody > tr:nth-of-type(even) {
            background-color: @tableBackgroundAccent;
        }
        .rblock label {
            text-align: center;
        }
470
    }
471
472
473
474
475
    .resultgraph,
    .reportsummary,
    .studentreport,
    .reportbuttons,
    .centerpara {
476
        text-align: center;
477
478
    }
}
479
480
481
482

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

484
485
486
487
488
// Dividers
.nav {
    .divider {
        overflow: hidden;
        width: 0;
489
490
491
492
493
494
495
496
497
498
499
        height: @navbarHeight;
        border-left: 1px solid @navbarBackground;
        border-right: 1px solid @navbarBackgroundHighlight;
    }
}
.navbar-inverse {
    .nav {
        .divider {
            border-left-color: @navbarInverseBackground;
            border-right-color: lighten(@navbarInverseBackground, 25%);
        }
500
501
502
503
504
505
    }
}
.dropdown-menu {
    .divider {
        width: auto;
        height: 1px;
506
507
        border-left: 0 none;
        border-right: 0 none;
508
    }
509
}
510
511
512

// Usermenu
.usermenu {
513
514
515
516
    .login {
        color: @navbarText;
        line-height: 40px;
        a {
517
518
519
520
521
522
            color: @linkColor;
            &:hover,
            &:focus {
                color: @linkColorHover;
                text-decoration: underline;
            }
523
524
        }
    }
525
526
527
    .moodle-actionmenu {

        .toggle-display {
528
            display: block;
529
530
531
532
533
534
535
536
537
538
            opacity: 1;
            color: @navbarLinkColor;
            line-height: 40px;
            height: 40px;
            &:hover {
                color: @navbarLinkColorHover;
            }

            .userbutton {
                height: 40px;
539
                line-height: 40px;
540
                .avatars {
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
                    display: inline-block;
                    height: 36px;
                    width: 36px;
                    vertical-align: middle;
                    margin-right: 6px;
                    margin-left: 6px;

                    .avatar,
                    img {
                        display: block;
                    }
                }
                .usertext {
                    display: inline-block;
                    vertical-align: middle;
                    line-height: 1em;
                    color: inherit;
                    .meta,
                    .role {
                        display: block;
                        font-size: 12px;
                        .value {
                            font-weight: bold;
                        }
                    }
                    .role {
                        font-weight: bold;
                    }
                }
570
571
            }

572
573
574
            // Hide caret when JS is disabled.
            .caret {
                display: none;
575
576
            }
        }
577
578
579
580
581
582
583
584
585
586
587
588
589


        // A little bit of visual feedback for the action menu when Javascript is disabled.
        .menu {
            .menu-action.icon {
                img {
                    border-radius: 0;
                    background: transparent;
                    box-shadow: none;
                }
                &:hover img {
                    background: #fff;
                    border-radius: 4px;
590
                    box-shadow: 0 0 16px rgba(0, 0, 0, 0.125);
591
592
593
                }
            }
        }
594
595
596
597
598
599
600
601
602
        &[data-enhanced] .menu {
            .menu-action.icon,
            .menu-action.icon:hover {
                img {
                    border-radius: 0;
                    background: transparent;
                    box-shadow: none;
                }
            }
603
        }
604

605
606
    }
}
607
.navbar-inverse {
608
609
610
611
612
613
614
615
616
617
    .usermenu {
        .login {
            color: @navbarInverseText;
            a {
                color: @navbarInverseLinkColor;
                &:hover {
                    color: @navbarInverseLinkColorHover;
                }
            }
        }
618
619
620
621
622
623
        .moodle-actionmenu {
            .toggle-display {
                color: @navbarInverseLinkColor;
            }
            .userbutton {
                .usertext {
624
                    color: @navbarInverseLinkColor;
625
626
627
628
629
630
                    .meta {
                        color: @navbarInverseText;
                        .value {
                            color: @navbarInverseLinkColor;
                        }
                    }
631
632
                }
            }
633
634
635
636
637
638
639
640
            &:hover {
                .usertext {
                    color: @navbarInverseLinkColorHover;
                    .meta {
                        color: @navbarInverseText;
                        .value {
                            color: @navbarInverseLinkColorHover;
                        }
641
642
643
                    }
                }
            }
644
            &[data-enhanced] .toggle-display.textmenu {
645
646
647
                .caret {
                    border-top-color: @navbarInverseLinkColorHover;
                }
648
            }
649
650
651
652
653
654
655
656
657
658
659
660

            // A little bit of visual feedback for the action menu when Javascript is disabled.
            .menu {
                .menu-action.icon {
                    img {
                        border-radius: 0;
                        background: transparent;
                        box-shadow: none;
                    }
                    &:hover img {
                        background: #333;
                        border-radius: 4px;
661
                        box-shadow: 0 0 16px rgba(255, 255, 255, 1);
662
663
664
665
666
667
668
669
670
671
672
673
674
                    }
                }
            }
            &[data-enhanced] .menu {
                .menu-action.icon,
                .menu-action.icon:hover {
                    img {
                        border-radius: 0;
                        background: transparent;
                        box-shadow: none;
                    }
                }
            }
675
676
677
        }
    }
}
678
679

.jsenabled {
680
    .usermenu {
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
        .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;
700
                margin: 0;
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
            }
            > .menu {
                min-width: 160px;
                .filler {
                    display: block;
                    .nav-divider();
                }
            }

            &.show {
                background-color: @navbarLinkBackgroundActive;
                .menu {
                    padding: 5px 0;
                    margin: 2px 0 0;
                    background-clip: padding-box;
                    &:before {
                        content: '';
                        display: inline-block;
719
720
                        border-left: 7px solid transparent;
                        border-right: 7px solid transparent;
721
722
723
724
725
726
727
728
                        border-bottom: 7px solid #ccc;
                        border-bottom-color: @dropdownBorder;
                        position: absolute;
                        top: -7px;
                    }
                    &:after {
                        content: '';
                        display: inline-block;
729
730
                        border-left: 6px solid transparent;
                        border-right: 6px solid transparent;
731
732
733
734
735
736
737
738
                        border-bottom: 6px solid @dropdownBackground;
                        position: absolute;
                        top: -6px;
                    }

                    a {
                        border-radius: 0;

739
740
741
                        &:focus {
                            text-decoration: none;
                        }
742
                        &:hover {
743
                            text-decoration: none;
744
745
746
747
748
749
750
751
752
                            #gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover, 5%));
                        }
                    }
                    &.align-tr-br {
                        margin-top: 2px;
                    }
                    .box-shadow (0 5px 10px rgba(0, 0, 0, 0.2));
                }
            }
753
        }
754
755
756
757
758
759
760
761
    }
    .navbar-inverse {
        .usermenu {
            .moodle-actionmenu {

                &.show {
                    background-color: @navbarInverseLinkBackgroundActive;
                }
762
763
            }
        }
764
765
766
    }
}

767
768
769
770
771
772
773

.usermenu {
    float: right;
    > .moodle-actionmenu {
        > .menu {
            &:before {
                right: 9px;
774
            }
775
776
            &:after {
                right: 10px;
777
            }
778
        }
779
780
        > .menubar li a {
            text-align: right;
781
782
783
        }
    }
}
784
785
786
787
&.userloggedinas .usermenu .userbutton .avatars {
    .avatar {
        &.current {
            left: 16px;
788
789
790
        }
    }
}
791
792
793
794
795
796
797
798
799
800
801
802
803

.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%;
804
            box-shadow: -2px -2px 16px rgba(0, 0, 0, 0.25);
805
806
807
808
809
810
811
812
        }
        img {
            width: inherit;
            height: inherit;
        }
        overflow: hidden;
    }
}
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855

// 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: @white;
        background-image: none;
        height: 40px;
        width: 30px;
        border-radius: 3px;
        border: 0;
        overflow: visible;
        margin: 0 6px 6px 0;
    }
    span.qnbutton {
        cursor: default;
        background-color: @inputDisabledBackground;
        color: @gray;
    }
    a.qnbutton:hover,
    a.qnbutton:active,
    a.qnbutton:focus {
        text-decoration: underline;
    }

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

    .qnbutton.flagged .thispageholder {
856
        background: transparent url([[pix:theme|mod/quiz/flag-on]]) 15px 0 no-repeat;
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
    }

    .qnbutton .trafficlight {
        border: 0;
        background: @white none center/10px no-repeat scroll;
        height: 20px;
        margin-top: 20px;
        border-radius: 0 0 3px 3px;
    }

    .qnbutton.notyetanswered .trafficlight,
    .qnbutton.invalidanswer .trafficlight {
        background-color: @white;
    }
    .qnbutton.invalidanswer .trafficlight {
        background-image: url([[pix:theme|mod/quiz/warningtriangle]]);
    }
    .qnbutton.correct .trafficlight {
        background-image: url([[pix:theme|mod/quiz/checkmark]]);
        background-color: @successText;
    }
    .qnbutton.blocked .trafficlight {
        background-image: url([[pix:core|t/locked]]);
        background-color: @inputDisabledBackground;
    }
    .qnbutton.notanswered .trafficlight,
    .qnbutton.incorrect .trafficlight {
        background-color: @errorText;
    }
    .qnbutton.partiallycorrect .trafficlight {
        background-image: url([[pix:theme|mod/quiz/whitecircle]]);
        background-color: @orange;
    }
    .qnbutton.complete .trafficlight,
    .qnbutton.answersaved .trafficlight,
892
    .qnbutton.requiresgrading .trafficlight {
893
894
895
        background-color: @grayLight;
    }
}
896
897
898
899
900
901
902
903
904
905
906
907
908
909

// Scorm.
.path-mod-scorm .scorm-center {
    text-align: center;
}

.path-mod-scorm.forcejavascript .scorm-center {
    display: none;
}

.path-mod-scorm.jsenabled .scorm-center {
    display: block;
}

910
911
912
913
.path-mod-scorm #region-main #intro {
    width: auto;
}