MDL-63830 block_myoverview: rounded images for summary view
[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
f6c6f215 84.block_myoverview,
41f61293
VDF
85.block_starredcourses,
86.block_recentlyaccesseditems,
87.block_recentlyaccessedcourses {
e4b4b9e7
BB
88 .course-info-container {
89 padding: 0.8rem;
90 }
e4b4b9e7
BB
91 .progress {
92 height: 0.5rem;
93 }
e4b4b9e7
BB
94 .course-summaryitem {
95 border: $border-width solid $border-color;
96 background-color: $body-bg;
97 }
3cfff885
BB
98 .icon {
99 margin-right: 0;
78c06a66
BB
100 &.fa-star {
101 color: $blue;
102 }
3cfff885 103 }
1a972542
BB
104 .card .coursemenubtn {
105 margin-top: -0.5rem;
106 }
97593c37 107 a.coursename,
3cfff885
BB
108 .btn-link {
109 color: inherit;
110 }
111 .btn.btn-link.btn-icon {
4fd6b770
BB
112 height: 36px;
113 width: 36px;
3cfff885
BB
114 padding: 0;
115 border-radius: 50%;
3cfff885
BB
116
117 @include hover-focus {
118 background-color: $gray-200;
119 }
3cfff885 120 }
fe149a99
LB
121}
122
41f61293
VDF
123.block_starredcourses,
124.block_recentlyaccesseditems,
125.block_recentlyaccessedcourses {
0ec60261
BB
126 .dashboard-card-deck {
127 flex-flow: nowrap;
128 overflow-y: scroll;
129 }
130}
131
fe149a99
LB
132.summaryimage {
133 height: 7rem;
f1b1f380 134 width: 7rem;
fe149a99
LB
135 background-position: center;
136 background-size: cover;
e4b4b9e7 137}
cab053f7 138
4fd6b770
BB
139.dashboard-card-deck .dashboard-card {
140 margin-bottom: $card-gutter;
141 flex-basis: 100%;
142 flex-grow: 0;
143 .dashboard-card-img {
144 height: 7rem;
145 background-position: center;
146 background-size: cover;
147 }
148 .dashboard-card-footer {
149 padding: 0.8rem;
150 }
151}
152
153.dashboard-card-deck {
154 @include media-breakpoint-up(sm) {
155 .dashboard-card {
e4b4b9e7
BB
156 flex-basis: calc(50% - #{$card-gutter});
157 }
4fd6b770
BB
158 }
159 @include media-breakpoint-up(md) {
160 .dashboard-card {
161 flex-basis: calc(33.33% - #{$card-gutter});
e4b4b9e7 162 }
4fd6b770
BB
163 }
164 @include media-breakpoint-up(lg) {
165 .dashboard-card {
166 flex-basis: calc(25% - #{$card-gutter});
e4b4b9e7 167 }
4fd6b770
BB
168 }
169 @include media-breakpoint-up(xl) {
170 .dashboard-card {
171 flex-basis: calc(20% - #{$card-gutter});
172 }
173 }
174}
175
176#region-main.has-blocks {
177 .dashboard-card-deck {
e4b4b9e7 178 @include media-breakpoint-up(lg) {
4fd6b770
BB
179 .dashboard-card {
180 flex-basis: calc(33.33% - #{$card-gutter});
e4b4b9e7
BB
181 }
182 }
183 @include media-breakpoint-up(xl) {
4fd6b770
BB
184 .dashboard-card {
185 flex-basis: calc(25% - #{$card-gutter});
e4b4b9e7 186 }
cab053f7
RW
187 }
188 }
189}
0eb85562 190
4fd6b770
BB
191body.drawer-open-left #region-main.has-blocks {
192 .dashboard-card-deck {
193 @include media-breakpoint-up(lg) {
194 .dashboard-card {
195 flex-basis: calc(33.33% - #{$card-gutter});
196 }
e4b4b9e7 197 }
4fd6b770
BB
198 @media (min-width: 1400px) {
199 .dashboard-card {
200 flex-basis: calc(25% - #{$card-gutter});
201 }
e4b4b9e7 202 }
cbd3c4fe 203 }
7243eef9 204}
57ea73d0 205
4fd6b770
BB
206@media (min-width: 1200px) {
207 #block-region-side-pre {
208 .dashboard-card-deck {
209 margin: 0;
210 .dashboard-card {
211 flex-basis: 100% !important;
212 margin-left: 0;
213 margin-right: 0;
214 }
3cfff885
BB
215 }
216 }
c8cc25ca
BB
217}
218
57ea73d0
DW
219// Show expand collapse with font-awesome.
220.block_settings .block_tree [aria-expanded="true"],
221.block_settings .block_tree [aria-expanded="true"].emptybranch,
222.block_settings .block_tree [aria-expanded="false"],
223.block_navigation .block_tree [aria-expanded="true"],
224.block_navigation .block_tree [aria-expanded="true"].emptybranch,
225.block_navigation .block_tree [aria-expanded="false"] {
226 background-image: none;
227}
228.block_settings .block_tree [aria-expanded="true"]:before,
229.block_navigation .block_tree [aria-expanded="true"]:before {
230 content: $fa-var-angle-down;
231 margin-right: 0;
232 font-size: 16px;
233 @extend .fa;
234 width: 16px;
235}
236
237.block_settings .block_tree [aria-expanded="false"]:before,
238.block_navigation .block_tree [aria-expanded="false"]:before {
239 content: $fa-var-angle-right;
240 font-size: 16px;
241 margin-right: 0;
242 @extend .fa;
243 width: 16px;
244}
245.dir-rtl {
246 .block_settings .block_tree [aria-expanded="false"]:before,
247 .block_navigation .block_tree [aria-expanded="false"]:before {
248 content: $fa-var-angle-left;
249 }
250}
251
252.block_navigation .block_tree p.hasicon,
253.block_settings .block_tree p.hasicon {
254 text-indent: -3px;
255
256 .icon {
257 margin-right: 2px;
258 }
41f61293 259}