Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
//
2
// Base styles
3
//
4
.editing .block_with_controls {
5
  min-height: 320px;
6
}
7
 
8
.card {
9
  margin-bottom: 40px;
10
  padding: 0;
11
 
12
  position: relative;
13
 
14
  display: flex;
15
  flex-direction: column;
16
  min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
17
  height: $card-height;
18
  word-wrap: break-word;
19
 
20
  >hr {
21
    margin-right: 0;
22
    margin-left: 0;
23
  }
24
 
25
  >.list-group {
26
    border-top: inherit;
27
    border-bottom: inherit;
28
 
29
    &:first-child {
30
      border-top-width: 0;
31
      @include border-top-radius($card-inner-border-radius);
32
    }
33
 
34
    &:last-child {
35
      border-bottom-width: 0;
36
      @include border-bottom-radius($card-inner-border-radius);
37
    }
38
  }
39
 
40
  &:last-of-type {
41
    margin-bottom: 0;
42
  }
43
 
44
  // Due to specificity of the above selector (`.card > .list-group`), we must
45
  // use a child selector here to prevent double borders.
46
  >.card-header+.list-group,
47
  >.list-group+.card-footer {
48
    border-top: 0;
49
  }
50
}
51
 
52
.card-body {
53
  // Enable `flex-grow: 1` for decks and groups so that card blocks take up
54
  // as much space as possible, ensuring footers are aligned to the bottom.
55
  flex: 1 1 auto;
56
  // Workaround for the image size bug in IE
57
  // See: https://github.com/twbs/bootstrap/pull/28855
58
  min-height: 1px;
59
  color: $card-color;
60
 
61
  &.alert-info {
62
    padding: 10px;
63
    border-radius: $btn-border-radius;
64
  }
65
 
66
  .theme-dark & {
67
    color: $dm-card-color;
68
  }
69
 
70
  .generaltable tbody tr {
71
    border: 0;
72
  }
73
}
74
 
75
.card-title {
76
  margin-bottom: .5rem;
77
 
78
  font-weight: $font-weight-medium;
79
  font-size: $font-size-xs;
80
  line-height: 135%;
81
  color: $body-color-light;
82
  letter-spacing: .025rem;
83
 
84
  .theme-dark & {
85
    color: $dm-body-color-light;
86
  }
87
 
88
  a {
89
    color: $body-color-light;
90
 
91
    .theme-dark & {
92
      color: $dm-body-color-light;
93
    }
94
  }
95
}
96
 
97
.card-subtitle {
98
  margin-top: -$card-spacer-y * 0.5;
99
  margin-bottom: 0;
100
}
101
 
102
.card-text {
103
  font-size: $font-size-sm;
104
  color: $body-color-secondary;
105
 
106
  .theme-dark & {
107
    color: $dm-body-color-secondary;
108
  }
109
}
110
 
111
.card-text:last-child {
112
  margin-bottom: 0;
113
}
114
 
115
.card-link {
116
  @include hover() {
117
    text-decoration: none;
118
  }
119
 
120
  +.card-link {
121
    margin-left: $card-spacer-x;
122
  }
123
}
124
 
125
//
126
// Optional textual caps
127
//
128
 
129
.card-header {
130
  padding: $card-spacer-y $card-spacer-x;
131
  margin-bottom: 0; // Removes the default margin-bottom of <hN>
132
  color: $card-cap-color;
133
  background-color: $card-cap-bg;
134
 
135
  #page-admin-tool-dataprivacy-summary & {
136
    padding: 5px 0;
137
  }
138
 
139
  .theme-dark & {
140
    color: $dm-card-cap-color;
141
    background-color: $dm-card-cap-bg;
142
  }
143
 
144
  .course-selected & {
145
    padding: 20px 0;
146
    font-size: $font-size-md;
147
  }
148
 
149
  &:first-child {
150
    @include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
151
  }
152
}
153
 
154
.card-footer {
155
  padding: $card-spacer-y $card-spacer-x;
156
  color: $card-cap-color;
157
  background-color: $card-cap-bg;
158
  border-top: $card-border-width solid $card-border-color;
159
 
160
  .theme-dark & {
161
    color: $dm-card-cap-color;
162
    background-color: $dm-card-cap-bg;
163
    border-top: $card-border-width solid $dm-card-border-color;
164
  }
165
 
166
  &:last-child {
167
    @include border-radius(0 0 $card-inner-border-radius $card-inner-border-radius);
168
  }
169
 
170
  #data-listview-content & {
171
    padding: 0;
172
  }
173
 
174
}
175
 
176
.card {
177
  .footer {
178
    br {
179
      display: none;
180
    }
181
  }
182
}
183
 
184
//
185
// Header navs
186
//
187
 
188
.card-header-tabs {
189
  margin-right: -$card-spacer-x * 0.5;
190
  margin-bottom: -$card-spacer-y;
191
  margin-left: -$card-spacer-x * 0.5;
192
  border-bottom: 0;
193
}
194
 
195
.card-header-pills {
196
  margin-right: -$card-spacer-x * 0.5;
197
  margin-left: -$card-spacer-x * 0.5;
198
}
199
 
200
// Card image
201
.card-img-overlay {
202
  position: absolute;
203
  top: 0;
204
  right: 0;
205
  bottom: 0;
206
  left: 0;
207
  padding: $card-img-overlay-padding;
208
  @include border-radius($card-inner-border-radius);
209
}
210
 
211
.card-img,
212
.card-img-top,
213
.card-img-bottom {
214
  flex-shrink: 0; // For IE: https://github.com/twbs/bootstrap/issues/29396
215
  width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
216
}
217
 
218
.card-img,
219
.card-img-top {
220
  @include border-top-radius($card-inner-border-radius);
221
}
222
 
223
.card-img,
224
.card-img-bottom {
225
  @include border-bottom-radius($card-inner-border-radius);
226
}
227
 
228
 
229
// Card deck
230
 
231
.card-deck {
232
  .card {
233
    margin-bottom: $card-deck-margin;
234
  }
235
 
236
  @include media-breakpoint-up(sm) {
237
    display: flex;
238
    flex-flow: row wrap;
239
    margin-right: -$card-deck-margin;
240
    margin-left: -$card-deck-margin;
241
 
242
    .card {
243
      // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
244
      flex: 1 0 0%;
245
      margin-right: $card-deck-margin;
246
      margin-bottom: 0; // Override the default
247
      margin-left: $card-deck-margin;
248
    }
249
  }
250
}
251
 
252
 
253
//
254
// Card groups
255
//
256
 
257
.card-group {
258
 
259
  // The child selector allows nested `.card` within `.card-group`
260
  // to display properly.
261
  >.card {
262
    margin-bottom: $card-group-margin;
263
  }
264
 
265
  @include media-breakpoint-up(sm) {
266
    display: flex;
267
    flex-flow: row wrap;
268
 
269
    // The child selector allows nested `.card` within `.card-group`
270
    // to display properly.
271
    >.card {
272
      // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
273
      flex: 1 0 0%;
274
      margin-bottom: 0;
275
 
276
      +.card {
277
        margin-left: 0;
278
        border-left: 0;
279
      }
280
 
281
      // Handle rounded corners
282
      @if $enable-rounded {
283
        &:not(:last-child) {
284
          @include border-right-radius(0);
285
 
286
          .card-img-top,
287
          .card-header {
288
            // stylelint-disable-next-line property-disallowed-list
289
            border-top-right-radius: 0;
290
          }
291
 
292
          .card-img-bottom,
293
          .card-footer {
294
            // stylelint-disable-next-line property-disallowed-list
295
            border-bottom-right-radius: 0;
296
          }
297
        }
298
 
299
        &:not(:first-child) {
300
          @include border-left-radius(0);
301
 
302
          .card-img-top,
303
          .card-header {
304
            // stylelint-disable-next-line property-disallowed-list
305
            border-top-left-radius: 0;
306
          }
307
 
308
          .card-img-bottom,
309
          .card-footer {
310
            // stylelint-disable-next-line property-disallowed-list
311
            border-bottom-left-radius: 0;
312
          }
313
        }
314
      }
315
    }
316
  }
317
}
318
 
319
 
320
//
321
// Columns
322
//
323
 
324
.card-columns {
325
  .card {
326
    margin-bottom: $card-columns-margin;
327
  }
328
 
329
  @include media-breakpoint-up(sm) {
330
    column-count: $card-columns-count;
331
    column-gap: $card-columns-gap;
332
    orphans: 1;
333
    widows: 1;
334
 
335
    .card {
336
      display: inline-block; // Don't let them vertically span multiple columns
337
      width: 100%; // Don't let their width change
338
    }
339
  }
340
}
341
 
342
 
343
//
344
// Accordion
345
//
346
 
347
.accordion {
348
  >.card {
349
    overflow: hidden;
350
 
351
    &:not(:last-of-type) {
352
      border-bottom: 0;
353
      @include border-bottom-radius(0);
354
    }
355
 
356
    &:not(:first-of-type) {
357
      @include border-top-radius(0);
358
    }
359
 
360
    >.card-header {
361
      @include border-radius(0);
362
      margin-bottom: -$card-border-width;
363
    }
364
  }
365
}
366
 
367
 
368
// Remove styles for HTML blocks
369
.block_html {
370
  padding: 0;
371
  border: none;
372
  border-radius: 0;
373
 
374
  .theme-dark & {
375
    border: none;
376
 
377
    .card-body {
378
      padding: 0;
379
    }
380
  }
381
}
382
 
383
.course-card .card-img-top,
384
.theme-card .card-img-top {
385
  aspect-ratio: 16 / 9;
386
  background-position: center;
387
  background-size: cover;
388
}
389
 
390
.theme-card {
391
  width: 100%;
392
 
393
  .h5 {
394
    font-size: 18px;
395
    margin-bottom: 0;
396
  }
397
}