MDL-64376 theme_boost: fire event on nav drawer toggle
[moodle.git] / theme / boost / scss / moodle / blocks.scss
CommitLineData
d7fbf722 1.blockmovetarget .accesshide {
536f0460 2 position: relative;
d7fbf722 3 left: initial;
536f0460 4}
270dd871 5
54ff9a4b
SL
6.block:target {
7 padding-top: 0 !important; /* stylelint-disable declaration-no-important */
8 margin-top: 0 !important;
9}
10
270dd871
FM
11.block_search_forums .searchform {
12 /* Override plugin's default. */
13 text-align: left;
14}
400274bc
DW
15
16.block.block_navigation .block_tree ul,
17.block_settings .block_tree ul {
18 margin-left: 0;
19}
1149c235
FM
20
21.block .block-controls {
22 .dropdown-toggle {
23 /* So that the caret takes the colour of the icon. */
9d67a408 24 color: $body-color;
1149c235
FM
25 }
26}
99061152 27
63d0d9b4 28$blocks-column-width: 360px !default;
99061152 29
0a58ec24
DW
30[data-region="blocks-column"] {
31 width: $blocks-column-width;
32 float: right;
99061152
DW
33}
34
3ec69c2e 35$blocks-plus-gutter: $blocks-column-width + ( $grid-gutter-width / 2 );
0a58ec24 36
11774d90
DW
37/* We put an absolutely positioned div in a relatively positioned div so it takes up no space */
38#region-main-settings-menu {
39 position: relative;
40 float: left;
41 width: 100%;
42}
43#region-main-settings-menu > div {
44 position: absolute;
45 right: 0;
46 z-index: 100;
47 margin: 1rem;
48}
d8cfd611
DW
49.region_main_settings_menu_proxy {
50 width: 4rem;
51 height: 2rem;
52 background-color: $card-bg;
53 margin-left: $card-spacer-x / 2;
54 margin-bottom: $card-spacer-x / 2;
55 border-bottom-left-radius: 0.5rem;
56 float: right;
57}
4682f17c
DW
58
59// Required for IE11 to prevent blocks being pushed under the content.
11774d90 60#region-main-settings-menu.has-blocks,
0a58ec24
DW
61#region-main.has-blocks {
62 display: inline-block;
63 width: calc(100% - #{$blocks-plus-gutter});
42654589 64 @include media-breakpoint-down(lg) {
0a58ec24 65 width: 100%;
970bb713
P
66 /* MDL-63102 - Remove extra space at bottom.
67 If modifying make sure block-region is horizontally stacked when in full screen */
68 display: block;
99061152
DW
69 }
70}
a0bdffbd
DW
71
72[data-region="blocks-column"] {
42654589 73 @include media-breakpoint-down(lg) {
a0bdffbd
DW
74 width: 100%;
75 }
76}
cab053f7 77
e4b4b9e7 78$card-gutter : $card-deck-margin * 2;
cab053f7 79
0ec60261 80.block .empty-placeholder-image-lg {
356bfb69 81 height: 5rem;
0ec60261
BB
82}
83
44b54926 84.block .block-cards {
e4b4b9e7
BB
85 .course-info-container {
86 padding: 0.8rem;
87 }
e4b4b9e7
BB
88 .progress {
89 height: 0.5rem;
90 }
e4b4b9e7
BB
91 .course-summaryitem {
92 border: $border-width solid $border-color;
93 background-color: $body-bg;
94 }
3cfff885
BB
95 .icon {
96 margin-right: 0;
97 }
1a972542
BB
98 .card .coursemenubtn {
99 margin-top: -0.5rem;
3cfff885 100 }
97593c37 101 a.coursename,
3cfff885
BB
102 .btn-link {
103 color: inherit;
104 }
f87181fd
BB
105 .multiline {
106 white-space: normal;
107 }
3cfff885 108 .btn.btn-link.btn-icon {
4fd6b770
BB
109 height: 36px;
110 width: 36px;
3cfff885
BB
111 padding: 0;
112 border-radius: 50%;
3cfff885
BB
113
114 @include hover-focus {
115 background-color: $gray-200;
116 }
3cfff885 117 }
fe149a99
LB
118}
119
44b54926
BB
120.dashboard-card-deck.one-row {
121 flex-flow: nowrap;
a6501e96 122 overflow-x: scroll;
0ec60261
BB
123}
124
fe149a99 125.summaryimage {
eecff277
BB
126 height: 5rem;
127 width: 5rem;
fe149a99
LB
128 background-position: center;
129 background-size: cover;
e4b4b9e7 130}
cab053f7 131
8c890dd5
RW
132.dashboard-card-deck {
133 .dashboard-card {
134 margin-bottom: $card-gutter;
135 flex-basis: auto;
136 width: 100%;
137 flex-grow: 0;
138 flex-shrink: 0;
139 .dashboard-card-img {
140 height: 7rem;
141 background-position: center;
142 background-size: cover;
143 }
144 .dashboard-card-footer {
145 padding: 0.8rem;
146 }
4fd6b770 147 }
8c890dd5
RW
148
149 &.fixed-width-cards {
150 .dashboard-card {
151 width: 300px;
152 }
4fd6b770
BB
153 }
154}
155
8c890dd5 156.dashboard-card-deck:not(.fixed-width-cards) {
c412ddc8 157 @media (min-width: 576px) {
4fd6b770 158 .dashboard-card {
4f42ca11 159 width: calc(50% - #{$card-gutter});
e4b4b9e7 160 }
4fd6b770 161 }
c412ddc8 162 @media (min-width: 840px) {
4fd6b770 163 .dashboard-card {
4f42ca11 164 width: calc(33.33% - #{$card-gutter});
e4b4b9e7 165 }
4fd6b770 166 }
c412ddc8 167 @media (min-width: 1100px) {
4fd6b770 168 .dashboard-card {
4f42ca11 169 width: calc(25% - #{$card-gutter});
e4b4b9e7 170 }
4fd6b770 171 }
c412ddc8 172 @media (min-width: 1360px) {
4fd6b770 173 .dashboard-card {
4f42ca11 174 width: calc(20% - #{$card-gutter});
4fd6b770
BB
175 }
176 }
177}
178
179#region-main.has-blocks {
8c890dd5 180 .dashboard-card-deck:not(.fixed-width-cards) {
c412ddc8 181 @media (min-width: 1200px) {
4fd6b770 182 .dashboard-card {
4f42ca11 183 width: calc(33.33% - #{$card-gutter});
e4b4b9e7
BB
184 }
185 }
c412ddc8 186 @media (min-width: 1470px) {
4fd6b770 187 .dashboard-card {
4f42ca11 188 width: calc(25% - #{$card-gutter});
e4b4b9e7 189 }
cab053f7
RW
190 }
191 }
192}
0eb85562 193
c412ddc8 194body.drawer-open-left {
8c890dd5 195 .dashboard-card-deck:not(.fixed-width-cards) {
c412ddc8
BB
196 @media (min-width: 768px) {
197 .dashboard-card {
198 width: calc(100% - #{$card-gutter});
199 }
200 }
201 @media (min-width: 861px) {
202 .dashboard-card {
203 width: calc(50% - #{$card-gutter});
204 }
205 }
206 @media (min-width: 1122px) {
4fd6b770 207 .dashboard-card {
4f42ca11 208 width: calc(33.33% - #{$card-gutter});
4fd6b770 209 }
e4b4b9e7 210 }
c412ddc8 211 @media (min-width: 1381px) {
4fd6b770 212 .dashboard-card {
4f42ca11 213 width: calc(25% - #{$card-gutter});
4fd6b770 214 }
e4b4b9e7 215 }
cbd3c4fe 216 }
7243eef9 217}
57ea73d0 218
c412ddc8 219body.drawer-open-left #region-main.has-blocks {
8c890dd5 220 .dashboard-card-deck:not(.fixed-width-cards) {
c412ddc8
BB
221 @media (min-width: 1200px) {
222 .dashboard-card {
223 width: calc(100% - #{$card-gutter});
224 }
225 }
226 @media (min-width: 1236px) {
227 .dashboard-card {
228 width: calc(50% - #{$card-gutter});
229 }
230 }
231 @media (min-width: 1497px) {
232 .dashboard-card {
233 width: calc(33.33% - #{$card-gutter});
234 }
235 }
236 }
237}
238
4fd6b770
BB
239@media (min-width: 1200px) {
240 #block-region-side-pre {
8c890dd5 241 .dashboard-card-deck:not(.fixed-width-cards) {
c412ddc8
BB
242 margin-left: 0;
243 margin-right: 0;
4fd6b770 244 .dashboard-card {
c412ddc8 245 width: calc(100% - #{$card-gutter}) !important;
4fd6b770 246 }
3cfff885
BB
247 }
248 }
c8cc25ca
BB
249}
250
44b54926
BB
251.block_recentlyaccesseditems {
252 img.icon {
253 height: auto;
254 width: auto;
255 margin-right: 6px;
256 }
257}
258
356bfb69
BB
259.block_myoverview {
260 .content {
261 min-height: 19.35rem;
262 }
263 .paged-content-page-container {
264 min-height: 13rem;
265 }
266}
267
57ea73d0
DW
268// Show expand collapse with font-awesome.
269.block_settings .block_tree [aria-expanded="true"],
270.block_settings .block_tree [aria-expanded="true"].emptybranch,
271.block_settings .block_tree [aria-expanded="false"],
272.block_navigation .block_tree [aria-expanded="true"],
273.block_navigation .block_tree [aria-expanded="true"].emptybranch,
274.block_navigation .block_tree [aria-expanded="false"] {
275 background-image: none;
276}
277.block_settings .block_tree [aria-expanded="true"]:before,
278.block_navigation .block_tree [aria-expanded="true"]:before {
279 content: $fa-var-angle-down;
280 margin-right: 0;
281 font-size: 16px;
282 @extend .fa;
283 width: 16px;
284}
285
286.block_settings .block_tree [aria-expanded="false"]:before,
287.block_navigation .block_tree [aria-expanded="false"]:before {
288 content: $fa-var-angle-right;
289 font-size: 16px;
290 margin-right: 0;
291 @extend .fa;
292 width: 16px;
293}
294.dir-rtl {
295 .block_settings .block_tree [aria-expanded="false"]:before,
296 .block_navigation .block_tree [aria-expanded="false"]:before {
297 content: $fa-var-angle-left;
298 }
299}
300
301.block_navigation .block_tree p.hasicon,
302.block_settings .block_tree p.hasicon {
303 text-indent: -3px;
304
305 .icon {
306 margin-right: 2px;
307 }
8c890dd5 308}