File: value_box.scss

package info (click to toggle)
r-cran-bslib 0.4.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,332 kB
  • sloc: javascript: 10,075; makefile: 30; sh: 23
file content (65 lines) | stat: -rw-r--r-- 1,476 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
.bslib-value-box {

  .value-box-grid {
    grid-template-columns: var(--bslib-value-box-widths);
  }

  // Should also be .vfill-container/.vfill-item
  .value-box-showcase {
    align-items: center;
    justify-content: center;
    margin-top: auto;
    margin-bottom: auto;
    padding: 1rem;

    .bi, .fa { opacity: .85; }
    .bi { font-size: 5rem; }
    .fa { font-size: 4rem; }

    max-height: var(--bslib-value-box-max-height);

    &.showcase-top-right {
      align-items: end;
      padding-left: 0;
      padding-bottom: 0;
    }
  }

  // Should also be .vfill-container/.vfill-item
  .value-box-area {
    justify-content: center;
    padding: 1.5rem 1rem;
    font-size: .9rem;
    font-weight: 500;
    * {
      color: inherit;
      margin-bottom: 0;
      margin-top: 0;
    }
    &.border-start {
      border-color: rgba($border-color, 0.3) !important;
    }
  }

  &.bslib-full-screen {
    .value-box-grid {
      grid-template-columns: var(--bslib-value-box-widths-full-screen);
    }
    .value-box-showcase {
      max-height: var(--bslib-value-box-max-height-full-screen);
    }
  }

  &:not(.bslib-full-screen) {
    .value-box-showcase.showcase-top-right {
      margin-top: 0;
    }
  }
}

// Override layout_inline_grid()'s preference to collapse to full-width on mobile (inside the value box)
@include media-breakpoint-down(sm) {
  .bslib-value-box .value-box-grid {
    grid-template-columns: var(--bslib-value-box-widths) !important;
  }
}