on-demand release 3.6dev+
[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 }
e4b4b9e7
BB
111 @include media-breakpoint-down(sm) {
112 .summaryimage {
113 max-height: 7rem;
cab053f7
RW
114 }
115 }
e4b4b9e7 116}
cab053f7 117
4fd6b770
BB
118.dashboard-card-deck .dashboard-card {
119 margin-bottom: $card-gutter;
120 flex-basis: 100%;
121 flex-grow: 0;
122 .dashboard-card-img {
123 height: 7rem;
124 background-position: center;
125 background-size: cover;
126 }
127 .dashboard-card-footer {
128 padding: 0.8rem;
129 }
130}
131
132.dashboard-card-deck {
133 @include media-breakpoint-up(sm) {
134 .dashboard-card {
e4b4b9e7
BB
135 flex-basis: calc(50% - #{$card-gutter});
136 }
4fd6b770
BB
137 }
138 @include media-breakpoint-up(md) {
139 .dashboard-card {
140 flex-basis: calc(33.33% - #{$card-gutter});
e4b4b9e7 141 }
4fd6b770
BB
142 }
143 @include media-breakpoint-up(lg) {
144 .dashboard-card {
145 flex-basis: calc(25% - #{$card-gutter});
e4b4b9e7 146 }
4fd6b770
BB
147 }
148 @include media-breakpoint-up(xl) {
149 .dashboard-card {
150 flex-basis: calc(20% - #{$card-gutter});
151 }
152 }
153}
154
155#region-main.has-blocks {
156 .dashboard-card-deck {
e4b4b9e7 157 @include media-breakpoint-up(lg) {
4fd6b770
BB
158 .dashboard-card {
159 flex-basis: calc(33.33% - #{$card-gutter});
e4b4b9e7
BB
160 }
161 }
162 @include media-breakpoint-up(xl) {
4fd6b770
BB
163 .dashboard-card {
164 flex-basis: calc(25% - #{$card-gutter});
e4b4b9e7 165 }
cab053f7
RW
166 }
167 }
168}
0eb85562 169
4fd6b770
BB
170body.drawer-open-left #region-main.has-blocks {
171 .dashboard-card-deck {
172 @include media-breakpoint-up(lg) {
173 .dashboard-card {
174 flex-basis: calc(33.33% - #{$card-gutter});
175 }
e4b4b9e7 176 }
4fd6b770
BB
177 @media (min-width: 1400px) {
178 .dashboard-card {
179 flex-basis: calc(25% - #{$card-gutter});
180 }
e4b4b9e7 181 }
cbd3c4fe 182 }
7243eef9 183}
57ea73d0 184
4fd6b770
BB
185@media (min-width: 1200px) {
186 #block-region-side-pre {
187 .dashboard-card-deck {
188 margin: 0;
189 .dashboard-card {
190 flex-basis: 100% !important;
191 margin-left: 0;
192 margin-right: 0;
193 }
3cfff885
BB
194 }
195 }
c8cc25ca
BB
196}
197
57ea73d0
DW
198// Show expand collapse with font-awesome.
199.block_settings .block_tree [aria-expanded="true"],
200.block_settings .block_tree [aria-expanded="true"].emptybranch,
201.block_settings .block_tree [aria-expanded="false"],
202.block_navigation .block_tree [aria-expanded="true"],
203.block_navigation .block_tree [aria-expanded="true"].emptybranch,
204.block_navigation .block_tree [aria-expanded="false"] {
205 background-image: none;
206}
207.block_settings .block_tree [aria-expanded="true"]:before,
208.block_navigation .block_tree [aria-expanded="true"]:before {
209 content: $fa-var-angle-down;
210 margin-right: 0;
211 font-size: 16px;
212 @extend .fa;
213 width: 16px;
214}
215
216.block_settings .block_tree [aria-expanded="false"]:before,
217.block_navigation .block_tree [aria-expanded="false"]:before {
218 content: $fa-var-angle-right;
219 font-size: 16px;
220 margin-right: 0;
221 @extend .fa;
222 width: 16px;
223}
224.dir-rtl {
225 .block_settings .block_tree [aria-expanded="false"]:before,
226 .block_navigation .block_tree [aria-expanded="false"]:before {
227 content: $fa-var-angle-left;
228 }
229}
230
231.block_navigation .block_tree p.hasicon,
232.block_settings .block_tree p.hasicon {
233 text-indent: -3px;
234
235 .icon {
236 margin-right: 2px;
237 }
238}