File: _shiny_input.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 (48 lines) | stat: -rw-r--r-- 1,398 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
// Dropped in BS5, but this seems pretty fundamental?
$form-group-margin-bottom: 1rem !default;
.form-group {
  margin-bottom: $form-group-margin-bottom;
}

// The @extends here add a lot of bloat to version=4 (& it's not entirely correct)
// Instead of fixing, consider this deprecated, and for BS5, we'll modify
// their selectors directly to accomodate shiny
@if $bootstrap-version == 4 {
  .shiny-input-checkboxgroup, .shiny-input-radiogroup {
    // TODO: this is pretty expensive!
    .checkbox, .radio {
      @extend .form-check;
      label {
        @extend .form-check-label;
      }
      label > input {
        @extend .form-check-input;
      }
    }

  // Since these inline classes don't have a proper div container
  // (they're labels), we borrow just the styling we need from
  // .form-check-inline
  // https://github.com/rstudio/bs4/blob/7aadd19/inst/node_modules/bootstrap/scss/_forms.scss#L227-L240
    .checkbox-inline, .radio-inline {
      padding-left: 0;
      margin-right: $form-check-inline-margin-x;

      label > input {
        margin-top: 0;
        margin-right: $form-check-inline-input-margin-x;
        margin-bottom: 0;
      }
    }
  }
}

.input-daterange .input-group-addon.input-group-prepend.input-group-append {
  padding: inherit;
  line-height: inherit;
  text-shadow: inherit;
  border-width: 0;
  .input-group-text {
    border-radius: 0;
  }
}