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: 60px;
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
  text-transform: uppercase;
84
 
85
  .theme-dark & {
86
    color: $dm-body-color-light;
87
  }
88
 
89
  a {
90
    color: $body-color-light;
91
 
92
    .theme-dark & {
93
      color: $dm-body-color-light;
94
    }
95
  }
96
}
97
 
98
.card-subtitle {
99
  margin-top: -$card-spacer-y * 0.5;
100
  margin-bottom: 0;
101
}
102
 
103
.card-text {
104
  font-size: $font-size-sm;
105
  color: $body-color-secondary;
106
 
107
  .theme-dark & {
108
    color: $dm-body-color-secondary;
109
  }
110
}
111
 
112
.card-text:last-child {
113
  margin-bottom: 0;
114
}
115
 
116
.card-link {
117
  @include hover() {
118
    text-decoration: none;
119
  }
120
 
121
  +.card-link {
122
    margin-left: $card-spacer-x;
123
  }
124
}
125
 
126
//
127
// Optional textual caps
128
//
129
 
130
.card-header {
131
  padding: $card-spacer-y $card-spacer-x;
132
  margin-bottom: 0; // Removes the default margin-bottom of <hN>
133
  color: $card-cap-color;
134
  background-color: $card-cap-bg;
135
 
136
  #page-admin-tool-dataprivacy-summary & {
137
    padding: 5px 0;
138
  }
139
 
140
  .theme-dark & {
141
    color: $dm-card-cap-color;
142
    background-color: $dm-card-cap-bg;
143
  }
144
 
145
  .course-selected & {
146
    padding: 20px 0;
147
    font-size: $font-size-md;
148
  }
149
 
150
  &:first-child {
151
    @include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
152
  }
153
}
154
 
155
.card-footer {
156
  padding: $card-spacer-y $card-spacer-x;
157
  color: $card-cap-color;
158
  background-color: $card-cap-bg;
159
  border-top: $card-border-width solid $card-border-color;
160
 
161
  .theme-dark & {
162
    color: $dm-card-cap-color;
163
    background-color: $dm-card-cap-bg;
164
    border-top: $card-border-width solid $dm-card-border-color;
165
  }
166
 
167
  &:last-child {
168
    @include border-radius(0 0 $card-inner-border-radius $card-inner-border-radius);
169
  }
170
 
171
  #data-listview-content & {
172
    padding: 0;
173
  }
174
 
175
}
176
 
177
.card {
178
  .footer {
179
    br {
180
      display: none;
181
    }
182
  }
183
}
184
 
185
//
186
// Header navs
187
//
188
 
189
.card-header-tabs {
190
  margin-right: -$card-spacer-x * 0.5;
191
  margin-bottom: -$card-spacer-y;
192
  margin-left: -$card-spacer-x * 0.5;
193
  border-bottom: 0;
194
}
195
 
196
.card-header-pills {
197
  margin-right: -$card-spacer-x * 0.5;
198
  margin-left: -$card-spacer-x * 0.5;
199
}
200
 
201
// Card image
202
.card-img-overlay {
203
  position: absolute;
204
  top: 0;
205
  right: 0;
206
  bottom: 0;
207
  left: 0;
208
  padding: $card-img-overlay-padding;
209
  @include border-radius($card-inner-border-radius);
210
}
211
 
212
.card-img,
213
.card-img-top,
214
.card-img-bottom {
215
  flex-shrink: 0; // For IE: https://github.com/twbs/bootstrap/issues/29396
216
  width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
217
}
218
 
219
.card-img,
220
.card-img-top {
221
  @include border-top-radius($card-inner-border-radius);
222
}
223
 
224
.card-img,
225
.card-img-bottom {
226
  @include border-bottom-radius($card-inner-border-radius);
227
}
228
 
229
 
230
// Card deck
231
 
232
.card-deck {
233
  .card {
234
    margin-bottom: $card-deck-margin;
235
  }
236
 
237
  @include media-breakpoint-up(sm) {
238
    display: flex;
239
    flex-flow: row wrap;
240
    margin-right: -$card-deck-margin;
241
    margin-left: -$card-deck-margin;
242
 
243
    .card {
244
      // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
245
      flex: 1 0 0%;
246
      margin-right: $card-deck-margin;
247
      margin-bottom: 0; // Override the default
248
      margin-left: $card-deck-margin;
249
    }
250
  }
251
}
252
 
253
 
254
//
255
// Card groups
256
//
257
 
258
.card-group {
259
 
260
  // The child selector allows nested `.card` within `.card-group`
261
  // to display properly.
262
  >.card {
263
    margin-bottom: $card-group-margin;
264
  }
265
 
266
  @include media-breakpoint-up(sm) {
267
    display: flex;
268
    flex-flow: row wrap;
269
 
270
    // The child selector allows nested `.card` within `.card-group`
271
    // to display properly.
272
    >.card {
273
      // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
274
      flex: 1 0 0%;
275
      margin-bottom: 0;
276
 
277
      +.card {
278
        margin-left: 0;
279
        border-left: 0;
280
      }
281
 
282
      // Handle rounded corners
283
      @if $enable-rounded {
284
        &:not(:last-child) {
285
          @include border-right-radius(0);
286
 
287
          .card-img-top,
288
          .card-header {
289
            // stylelint-disable-next-line property-disallowed-list
290
            border-top-right-radius: 0;
291
          }
292
 
293
          .card-img-bottom,
294
          .card-footer {
295
            // stylelint-disable-next-line property-disallowed-list
296
            border-bottom-right-radius: 0;
297
          }
298
        }
299
 
300
        &:not(:first-child) {
301
          @include border-left-radius(0);
302
 
303
          .card-img-top,
304
          .card-header {
305
            // stylelint-disable-next-line property-disallowed-list
306
            border-top-left-radius: 0;
307
          }
308
 
309
          .card-img-bottom,
310
          .card-footer {
311
            // stylelint-disable-next-line property-disallowed-list
312
            border-bottom-left-radius: 0;
313
          }
314
        }
315
      }
316
    }
317
  }
318
}
319
 
320
 
321
//
322
// Columns
323
//
324
 
325
.card-columns {
326
  .card {
327
    margin-bottom: $card-columns-margin;
328
  }
329
 
330
  @include media-breakpoint-up(sm) {
331
    column-count: $card-columns-count;
332
    column-gap: $card-columns-gap;
333
    orphans: 1;
334
    widows: 1;
335
 
336
    .card {
337
      display: inline-block; // Don't let them vertically span multiple columns
338
      width: 100%; // Don't let their width change
339
    }
340
  }
341
}
342
 
343
 
344
//
345
// Accordion
346
//
347
 
348
.accordion {
349
  >.card {
350
    overflow: hidden;
351
 
352
    &:not(:last-of-type) {
353
      border-bottom: 0;
354
      @include border-bottom-radius(0);
355
    }
356
 
357
    &:not(:first-of-type) {
358
      @include border-top-radius(0);
359
    }
360
 
361
    >.card-header {
362
      @include border-radius(0);
363
      margin-bottom: -$card-border-width;
364
    }
365
  }
366
}
367
 
368
 
369
// Remove styles for HTML blocks
370
.block_html {
371
  padding: 0;
372
  border: none;
373
  border-radius: 0;
374
 
375
  .theme-dark & {
376
    border: none;
377
 
378
    .card-body {
379
      padding: 0;
380
    }
381
  }
382
}
383
 
384
.course-card .card-img-top,
385
.theme-card .card-img-top {
386
  aspect-ratio: 16 / 9;
387
  background-position: center;
388
  background-size: cover;
389
}
390
 
391
.theme-card {
392
  width: 100%;
393
  border-radius: $btn-border-radius;
394
  border: 1px solid $border-color;
395
 
396
  .theme-dark & {
397
    border-color: $dm-border-color;
398
  }
399
 
400
  form {
401
    width: 100%;
402
  }
403
 
404
  .btn-link {
405
    width: 30px;
406
    height: 30px;
407
    background-color: $gray-100;
408
    color: $body-color;
409
    border-radius: 100%;
410
 
411
    &:hover {
412
      background-color: $primary-color-100;
413
      color: $primary-color-600;
414
    }
415
 
416
    .theme-dark & {
417
      background-color: $dm-gray-100;
418
      color: $dm-body-color;
419
    }
420
  }
421
 
422
  .h5 {
423
    font-size: 18px;
424
    margin-bottom: 0;
425
  }
426
}