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