Proyectos de Subversion Moodle

Rev

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