Merge branch 'MDL-63923-master' of git://github.com/bmbrands/moodle
[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
BB
80.block .empty-placeholder-image-lg {
81 height: 125px;
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;
78c06a66
BB
97 &.fa-star {
98 color: $blue;
99 }
3cfff885 100 }
1a972542
BB
101 .card .coursemenubtn {
102 margin-top: -0.5rem;
3cfff885 103 }
97593c37 104 a.coursename,
3cfff885
BB
105 .btn-link {
106 color: inherit;
107 }
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
LB
125.summaryimage {
126 height: 7rem;
f1b1f380 127 width: 7rem;
fe149a99
LB
128 background-position: center;
129 background-size: cover;
e4b4b9e7 130}
cab053f7 131
4fd6b770
BB
132.dashboard-card-deck .dashboard-card {
133 margin-bottom: $card-gutter;
4f42ca11
BB
134 flex-basis: auto;
135 width: 100%;
4fd6b770 136 flex-grow: 0;
4f42ca11 137 flex-shrink: 0;
4fd6b770
BB
138 .dashboard-card-img {
139 height: 7rem;
140 background-position: center;
141 background-size: cover;
142 }
143 .dashboard-card-footer {
144 padding: 0.8rem;
145 }
146}
147
148.dashboard-card-deck {
c412ddc8 149 @media (min-width: 576px) {
4fd6b770 150 .dashboard-card {
4f42ca11 151 width: calc(50% - #{$card-gutter});
e4b4b9e7 152 }
4fd6b770 153 }
c412ddc8 154 @media (min-width: 840px) {
4fd6b770 155 .dashboard-card {
4f42ca11 156 width: calc(33.33% - #{$card-gutter});
e4b4b9e7 157 }
4fd6b770 158 }
c412ddc8 159 @media (min-width: 1100px) {
4fd6b770 160 .dashboard-card {
4f42ca11 161 width: calc(25% - #{$card-gutter});
e4b4b9e7 162 }
4fd6b770 163 }
c412ddc8 164 @media (min-width: 1360px) {
4fd6b770 165 .dashboard-card {
4f42ca11 166 width: calc(20% - #{$card-gutter});
4fd6b770
BB
167 }
168 }
169}
170
171#region-main.has-blocks {
172 .dashboard-card-deck {
c412ddc8 173 @media (min-width: 1200px) {
4fd6b770 174 .dashboard-card {
4f42ca11 175 width: calc(33.33% - #{$card-gutter});
e4b4b9e7
BB
176 }
177 }
c412ddc8 178 @media (min-width: 1470px) {
4fd6b770 179 .dashboard-card {
4f42ca11 180 width: calc(25% - #{$card-gutter});
e4b4b9e7 181 }
cab053f7
RW
182 }
183 }
184}
0eb85562 185
c412ddc8 186body.drawer-open-left {
4fd6b770 187 .dashboard-card-deck {
c412ddc8
BB
188 @media (min-width: 768px) {
189 .dashboard-card {
190 width: calc(100% - #{$card-gutter});
191 }
192 }
193 @media (min-width: 861px) {
194 .dashboard-card {
195 width: calc(50% - #{$card-gutter});
196 }
197 }
198 @media (min-width: 1122px) {
4fd6b770 199 .dashboard-card {
4f42ca11 200 width: calc(33.33% - #{$card-gutter});
4fd6b770 201 }
e4b4b9e7 202 }
c412ddc8 203 @media (min-width: 1381px) {
4fd6b770 204 .dashboard-card {
4f42ca11 205 width: calc(25% - #{$card-gutter});
4fd6b770 206 }
e4b4b9e7 207 }
cbd3c4fe 208 }
7243eef9 209}
57ea73d0 210
c412ddc8
BB
211body.drawer-open-left #region-main.has-blocks {
212 .dashboard-card-deck {
213 @media (min-width: 1200px) {
214 .dashboard-card {
215 width: calc(100% - #{$card-gutter});
216 }
217 }
218 @media (min-width: 1236px) {
219 .dashboard-card {
220 width: calc(50% - #{$card-gutter});
221 }
222 }
223 @media (min-width: 1497px) {
224 .dashboard-card {
225 width: calc(33.33% - #{$card-gutter});
226 }
227 }
228 }
229}
230
4fd6b770
BB
231@media (min-width: 1200px) {
232 #block-region-side-pre {
233 .dashboard-card-deck {
c412ddc8
BB
234 margin-left: 0;
235 margin-right: 0;
4fd6b770 236 .dashboard-card {
c412ddc8 237 width: calc(100% - #{$card-gutter}) !important;
4fd6b770 238 }
3cfff885
BB
239 }
240 }
c8cc25ca
BB
241}
242
44b54926
BB
243.block_recentlyaccesseditems {
244 img.icon {
245 height: auto;
246 width: auto;
247 margin-right: 6px;
248 }
249}
250
57ea73d0
DW
251// Show expand collapse with font-awesome.
252.block_settings .block_tree [aria-expanded="true"],
253.block_settings .block_tree [aria-expanded="true"].emptybranch,
254.block_settings .block_tree [aria-expanded="false"],
255.block_navigation .block_tree [aria-expanded="true"],
256.block_navigation .block_tree [aria-expanded="true"].emptybranch,
257.block_navigation .block_tree [aria-expanded="false"] {
258 background-image: none;
259}
260.block_settings .block_tree [aria-expanded="true"]:before,
261.block_navigation .block_tree [aria-expanded="true"]:before {
262 content: $fa-var-angle-down;
263 margin-right: 0;
264 font-size: 16px;
265 @extend .fa;
266 width: 16px;
267}
268
269.block_settings .block_tree [aria-expanded="false"]:before,
270.block_navigation .block_tree [aria-expanded="false"]:before {
271 content: $fa-var-angle-right;
272 font-size: 16px;
273 margin-right: 0;
274 @extend .fa;
275 width: 16px;
276}
277.dir-rtl {
278 .block_settings .block_tree [aria-expanded="false"]:before,
279 .block_navigation .block_tree [aria-expanded="false"]:before {
280 content: $fa-var-angle-left;
281 }
282}
283
284.block_navigation .block_tree p.hasicon,
285.block_settings .block_tree p.hasicon {
286 text-indent: -3px;
287
288 .icon {
289 margin-right: 2px;
290 }
41f61293 291}