blocks.scss 8.33 KB
Newer Older
1
.blockmovetarget .accesshide {
2
    position: relative;
3
    left: initial;
4
}
5

6
7
8
9
10
.block:target {
    padding-top: 0 !important; /* stylelint-disable declaration-no-important */
    margin-top: 0 !important;
}

11
12
13
14
.block_search_forums .searchform {
    /* Override plugin's default. */
    text-align: left;
}
15
16
17
18
19

.block.block_navigation .block_tree ul,
.block_settings .block_tree ul {
    margin-left: 0;
}
20
21
22
23

.block .block-controls {
    .dropdown-toggle {
        /* So that the caret takes the colour of the icon. */
24
        color: $body-color;
25
26
    }
}
27

28
$blocks-column-width: 360px !default;
29

30
31
32
[data-region="blocks-column"] {
    width: $blocks-column-width;
    float: right;
33
34
}

35
$blocks-plus-gutter: $blocks-column-width + ( $grid-gutter-width / 2 );
36

37
/* We put an absolutely positioned div in a relatively positioned div so it takes up no space */
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@include media-breakpoint-up(sm) {
    #region-main-settings-menu {
        position: relative;
        float: left;
        width: 100%;
    }

    #region-main-settings-menu > div {
        position: absolute;
        right: 0;
        z-index: 100;
        margin: 1rem;
    }

    .region_main_settings_menu_proxy {
        width: 4rem;
        height: 2rem;
        background-color: $body-bg;
        margin-left: $card-spacer-x / 2;
        margin-bottom: $card-spacer-x / 2;
        border-bottom-left-radius: 0.5rem;
        float: right;
    }
61
}
62
63
64
65
66

@include media-breakpoint-down(sm) {
    #region-main-settings-menu .menubar {
        justify-content: flex-end;
    }
67
}
68
69

// Required for IE11 to prevent blocks being pushed under the content.
70
#region-main-settings-menu.has-blocks,
71
72
73
#region-main.has-blocks {
    display: inline-block;
    width: calc(100% - #{$blocks-plus-gutter});
74
    @include media-breakpoint-down(lg) {
75
        width: 100%;
76
77
78
        /* MDL-63102 - Remove extra space at bottom.
        If modifying make sure block-region is horizontally stacked when in full screen */
        display: block;
79
80
    }
}
81

82
83
84
85
86
87
88
89
90
91
92
93
94
95
.header-action {
    #region-main-settings-menu {
        position: unset;
        float: none;
        width: auto;

        & > div {
            position: unset;
            right: auto;
            margin: 0;
        }
    }
}

96
[data-region="blocks-column"] {
97
    @include media-breakpoint-down(lg) {
98
99
100
        width: 100%;
    }
}
101

102
$card-gutter : $card-deck-margin * 2;
103

104
.block .empty-placeholder-image-lg {
105
    height: 5rem;
106
107
}

108
.block .block-cards {
109
110
111
112
113
114
115
116
117
118
    .course-info-container {
        padding: 0.8rem;
    }
    .progress {
        height: 0.5rem;
    }
    .course-summaryitem {
        border: $border-width solid $border-color;
        background-color: $body-bg;
    }
119
120
121
    .icon {
        margin-right: 0;
    }
122
123
    .card .coursemenubtn {
        margin-top: -0.5rem;
124
    }
125
    a.coursename,
126
    span.categoryname,
127
128
129
    .btn-link {
        color: inherit;
    }
130
131
132
    .multiline {
        white-space: normal;
    }
133
    .btn.btn-link.btn-icon {
134
135
        height: 36px;
        width: 36px;
136
137
138
139
140
141
142
        padding: 0;
        border-radius: 50%;

        @include hover-focus {
            background-color: $gray-200;
        }
    }
143
144
}

145
146
.dashboard-card-deck.one-row {
    flex-flow: nowrap;
147
    overflow-x: scroll;
148
149
}

150
.summaryimage {
151
152
    height: 5rem;
    width: 5rem;
153
154
    background-position: center;
    background-size: cover;
155
}
156

157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
.dashboard-card-deck {
    .dashboard-card {
        margin-bottom: $card-gutter;
        flex-basis: auto;
        width: 100%;
        flex-grow: 0;
        flex-shrink: 0;
        .dashboard-card-img {
            height: 7rem;
            background-position: center;
            background-size: cover;
        }
        .dashboard-card-footer {
            padding: 0.8rem;
        }
172
    }
173
174
175
176
177
178
    @include media-breakpoint-up(sm) {
        &.fixed-width-cards {
            .dashboard-card {
                width: 300px;
                max-width: 100%;
            }
179
        }
180
181
182
    }
}

183
.dashboard-card-deck:not(.fixed-width-cards) {
184
    @media (min-width: 576px) {
185
        .dashboard-card {
186
            width: calc(50% - #{$card-gutter});
187
        }
188
    }
189
    @media (min-width: 840px) {
190
        .dashboard-card {
191
            width: calc(33.33% - #{$card-gutter});
192
        }
193
    }
194
    @media (min-width: 1100px) {
195
        .dashboard-card {
196
            width: calc(25% - #{$card-gutter});
197
        }
198
    }
199
    @media (min-width: 1360px) {
200
        .dashboard-card {
201
            width: calc(20% - #{$card-gutter});
202
203
204
205
206
        }
    }
}

#region-main.has-blocks {
207
    .dashboard-card-deck:not(.fixed-width-cards) {
208
        @media (min-width: 1200px) {
209
            .dashboard-card {
210
                width: calc(33.33% - #{$card-gutter});
211
212
            }
        }
213
        @media (min-width: 1470px) {
214
            .dashboard-card {
215
                width: calc(25% - #{$card-gutter});
216
            }
217
218
219
        }
    }
}
220

221
body.drawer-open-left {
222
    .dashboard-card-deck:not(.fixed-width-cards) {
223
224
225
226
227
228
229
230
231
232
233
        @media (min-width: 768px) {
            .dashboard-card {
                width: calc(100% - #{$card-gutter});
            }
        }
        @media (min-width: 861px) {
            .dashboard-card {
                width: calc(50% - #{$card-gutter});
            }
        }
        @media (min-width: 1122px) {
234
            .dashboard-card {
235
                width: calc(33.33% - #{$card-gutter});
236
            }
237
        }
238
        @media (min-width: 1381px) {
239
            .dashboard-card {
240
                width: calc(25% - #{$card-gutter});
241
            }
242
        }
243
    }
244
}
245

246
body.drawer-open-left #region-main.has-blocks {
247
    .dashboard-card-deck:not(.fixed-width-cards) {
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
        @media (min-width: 1200px) {
            .dashboard-card {
                width: calc(100% - #{$card-gutter});
            }
        }
        @media (min-width: 1236px) {
            .dashboard-card {
                width: calc(50% - #{$card-gutter});
            }
        }
        @media (min-width: 1497px) {
            .dashboard-card {
                width: calc(33.33% - #{$card-gutter});
            }
        }
    }
}

266
267
@media (min-width: 1200px) {
    #block-region-side-pre {
268
        .dashboard-card-deck:not(.fixed-width-cards) {
269
270
            margin-left: 0;
            margin-right: 0;
271
            .dashboard-card {
272
                width: calc(100% - #{$card-gutter}) !important;
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
.block_recentlyaccessedcourses {
    .paging-bar-container {
        margin-top: -2.4rem;
        justify-content: flex-end;
    }

    @include media-breakpoint-down(xs) {
        .paging-bar-container {
            margin-top: 0;
        }
    }
}

#block-region-side-pre {
    .block_recentlyaccessedcourses {
        .paging-bar-container {
            margin-top: 0;
        }
    }
}

299
300
.block_recentlyaccesseditems {
    img.icon {
301
302
        height: 24px;
        width: 24px;
303
304
305
306
        margin-right: 6px;
    }
}

307
308
309
310
311
312
313
314
315
.block_myoverview {
    .content {
        min-height: 19.35rem;
    }
    .paged-content-page-container {
        min-height: 13rem;
    }
}

316
317
318
319
320
321
322
323
324
325
326
327
328
// Show expand collapse with font-awesome.
.block_settings .block_tree [aria-expanded="true"],
.block_settings .block_tree [aria-expanded="true"].emptybranch,
.block_settings .block_tree [aria-expanded="false"],
.block_navigation .block_tree [aria-expanded="true"],
.block_navigation .block_tree [aria-expanded="true"].emptybranch,
.block_navigation .block_tree [aria-expanded="false"] {
    background-image: none;
}
.block_settings .block_tree [aria-expanded="true"]:before,
.block_navigation .block_tree [aria-expanded="true"]:before {
    content: $fa-var-angle-down;
    margin-right: 0;
329
    @include fa-icon();
330
331
332
333
334
335
336
337
    font-size: 16px;
    width: 16px;
}

.block_settings .block_tree [aria-expanded="false"]:before,
.block_navigation .block_tree [aria-expanded="false"]:before {
    content: $fa-var-angle-right;
    margin-right: 0;
338
339
    @include fa-icon();
    font-size: 16px;
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
    width: 16px;
}
.dir-rtl {
    .block_settings .block_tree [aria-expanded="false"]:before,
    .block_navigation .block_tree [aria-expanded="false"]:before {
        content: $fa-var-angle-left;
    }
}

.block_navigation .block_tree p.hasicon,
.block_settings .block_tree p.hasicon {
    text-indent: -3px;

    .icon {
        margin-right: 2px;
    }
356
}
357
358
359

.block.invisibleblock .card-title {
    color: $text-muted;
360
361
362
363
364
365
366
}

@include media-breakpoint-down(sm) {
    .block.card {
        border-left: 0;
        border-right: 0;
    }
367
368
369
370
371
372
373
374
375
}

.block_social_activities li a.movehere {
    display: block;
    width: 100%;
    height: 2rem;
    border: 2px dashed $gray-800;
    margin: 4px 0;

376
}