administrate-bootstrap-theme 1.0.6 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/administrate-bootstrap-theme/bootstrap.bundle.js +2503 -3001
  3. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_accordion.scss +73 -33
  4. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_alert.scss +25 -14
  5. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_badge.scss +14 -5
  6. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_breadcrumb.scss +22 -10
  7. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_button-group.scss +6 -3
  8. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_buttons.scss +133 -28
  9. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_card.scss +60 -37
  10. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_carousel.scss +22 -15
  11. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_close.scss +33 -10
  12. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_containers.scss +1 -1
  13. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_dropdown.scss +86 -76
  14. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_functions.scss +10 -10
  15. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_grid.scss +9 -3
  16. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_helpers.scss +3 -0
  17. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_list-group.scss +60 -37
  18. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_maps.scss +174 -0
  19. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_mixins.scss +1 -2
  20. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_modal.scss +71 -44
  21. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_nav.scss +86 -28
  22. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_navbar.scss +101 -147
  23. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_offcanvas.scss +121 -61
  24. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_pagination.scss +66 -21
  25. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_placeholders.scss +1 -1
  26. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_popover.scss +90 -52
  27. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_progress.scss +30 -10
  28. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_reboot.scss +31 -45
  29. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_root.scss +155 -22
  30. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_spinners.scss +38 -22
  31. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_tables.scss +40 -24
  32. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_toasts.scss +38 -16
  33. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_tooltip.scss +60 -56
  34. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_type.scss +2 -0
  35. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_utilities.scss +209 -33
  36. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_variables-dark.scss +87 -0
  37. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_variables.scss +404 -294
  38. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-grid.scss +4 -9
  39. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-reboot.scss +4 -7
  40. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-utilities.scss +7 -6
  41. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap.scss +5 -6
  42. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_floating-labels.scss +37 -5
  43. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-check.scss +51 -14
  44. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-control.scss +36 -41
  45. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-range.scss +3 -3
  46. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-select.scss +12 -4
  47. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_input-group.scss +20 -9
  48. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_color-bg.scss +7 -0
  49. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_colored-links.scss +20 -2
  50. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_focus-ring.scss +5 -0
  51. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_icon-link.scss +25 -0
  52. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_position.scss +7 -1
  53. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_ratio.scss +2 -2
  54. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_vr.scss +2 -2
  55. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_alert.scss +11 -4
  56. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_banner.scss +7 -0
  57. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_breakpoints.scss +8 -8
  58. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_buttons.scss +32 -95
  59. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_caret.scss +30 -25
  60. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_color-mode.scss +21 -0
  61. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_container.scss +4 -2
  62. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_forms.scss +38 -19
  63. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_gradients.scss +1 -1
  64. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_grid.scss +14 -14
  65. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_list-group.scss +2 -0
  66. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_pagination.scss +4 -25
  67. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_reset-text.scss +1 -1
  68. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_table-variants.scss +12 -9
  69. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_utilities.scss +14 -6
  70. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_visually-hidden.scss +5 -1
  71. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/vendor/_rfs.scss +23 -29
  72. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_content_body.scss +21 -7
  73. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_navigation.scss +4 -0
  74. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_pagination.scss +11 -3
  75. data/lib/administrate-bootstrap-theme/version.rb +2 -2
  76. data/package.json +2 -2
  77. metadata +24 -3
@@ -2,43 +2,69 @@
2
2
  // Base styles
3
3
  //
4
4
 
5
+ .accordion {
6
+ // scss-docs-start accordion-css-vars
7
+ --#{$prefix}accordion-color: #{$accordion-color};
8
+ --#{$prefix}accordion-bg: #{$accordion-bg};
9
+ --#{$prefix}accordion-transition: #{$accordion-transition};
10
+ --#{$prefix}accordion-border-color: #{$accordion-border-color};
11
+ --#{$prefix}accordion-border-width: #{$accordion-border-width};
12
+ --#{$prefix}accordion-border-radius: #{$accordion-border-radius};
13
+ --#{$prefix}accordion-inner-border-radius: #{$accordion-inner-border-radius};
14
+ --#{$prefix}accordion-btn-padding-x: #{$accordion-button-padding-x};
15
+ --#{$prefix}accordion-btn-padding-y: #{$accordion-button-padding-y};
16
+ --#{$prefix}accordion-btn-color: #{$accordion-button-color};
17
+ --#{$prefix}accordion-btn-bg: #{$accordion-button-bg};
18
+ --#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon)};
19
+ --#{$prefix}accordion-btn-icon-width: #{$accordion-icon-width};
20
+ --#{$prefix}accordion-btn-icon-transform: #{$accordion-icon-transform};
21
+ --#{$prefix}accordion-btn-icon-transition: #{$accordion-icon-transition};
22
+ --#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon)};
23
+ --#{$prefix}accordion-btn-focus-box-shadow: #{$accordion-button-focus-box-shadow};
24
+ --#{$prefix}accordion-body-padding-x: #{$accordion-body-padding-x};
25
+ --#{$prefix}accordion-body-padding-y: #{$accordion-body-padding-y};
26
+ --#{$prefix}accordion-active-color: #{$accordion-button-active-color};
27
+ --#{$prefix}accordion-active-bg: #{$accordion-button-active-bg};
28
+ // scss-docs-end accordion-css-vars
29
+ }
30
+
5
31
  .accordion-button {
6
32
  position: relative;
7
33
  display: flex;
8
34
  align-items: center;
9
35
  width: 100%;
10
- padding: $accordion-button-padding-y $accordion-button-padding-x;
36
+ padding: var(--#{$prefix}accordion-btn-padding-y) var(--#{$prefix}accordion-btn-padding-x);
11
37
  @include font-size($font-size-base);
12
- color: $accordion-button-color;
38
+ color: var(--#{$prefix}accordion-btn-color);
13
39
  text-align: left; // Reset button style
14
- background-color: $accordion-button-bg;
40
+ background-color: var(--#{$prefix}accordion-btn-bg);
15
41
  border: 0;
16
42
  @include border-radius(0);
17
43
  overflow-anchor: none;
18
- @include transition($accordion-transition);
44
+ @include transition(var(--#{$prefix}accordion-transition));
19
45
 
20
46
  &:not(.collapsed) {
21
- color: $accordion-button-active-color;
22
- background-color: $accordion-button-active-bg;
23
- box-shadow: inset 0 ($accordion-border-width * -1) 0 $accordion-border-color;
47
+ color: var(--#{$prefix}accordion-active-color);
48
+ background-color: var(--#{$prefix}accordion-active-bg);
49
+ box-shadow: inset 0 calc(-1 * var(--#{$prefix}accordion-border-width)) 0 var(--#{$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list
24
50
 
25
51
  &::after {
26
- background-image: escape-svg($accordion-button-active-icon);
27
- transform: $accordion-icon-transform;
52
+ background-image: var(--#{$prefix}accordion-btn-active-icon);
53
+ transform: var(--#{$prefix}accordion-btn-icon-transform);
28
54
  }
29
55
  }
30
56
 
31
57
  // Accordion icon
32
58
  &::after {
33
59
  flex-shrink: 0;
34
- width: $accordion-icon-width;
35
- height: $accordion-icon-width;
60
+ width: var(--#{$prefix}accordion-btn-icon-width);
61
+ height: var(--#{$prefix}accordion-btn-icon-width);
36
62
  margin-left: auto;
37
63
  content: "";
38
- background-image: escape-svg($accordion-button-icon);
64
+ background-image: var(--#{$prefix}accordion-btn-icon);
39
65
  background-repeat: no-repeat;
40
- background-size: $accordion-icon-width;
41
- @include transition($accordion-icon-transition);
66
+ background-size: var(--#{$prefix}accordion-btn-icon-width);
67
+ @include transition(var(--#{$prefix}accordion-btn-icon-transition));
42
68
  }
43
69
 
44
70
  &:hover {
@@ -47,9 +73,8 @@
47
73
 
48
74
  &:focus {
49
75
  z-index: 3;
50
- border-color: $accordion-button-focus-border-color;
51
76
  outline: 0;
52
- box-shadow: $accordion-button-focus-box-shadow;
77
+ box-shadow: var(--#{$prefix}accordion-btn-focus-box-shadow);
53
78
  }
54
79
  }
55
80
 
@@ -58,14 +83,15 @@
58
83
  }
59
84
 
60
85
  .accordion-item {
61
- background-color: $accordion-bg;
62
- border: $accordion-border-width solid $accordion-border-color;
86
+ color: var(--#{$prefix}accordion-color);
87
+ background-color: var(--#{$prefix}accordion-bg);
88
+ border: var(--#{$prefix}accordion-border-width) solid var(--#{$prefix}accordion-border-color);
63
89
 
64
90
  &:first-of-type {
65
- @include border-top-radius($accordion-border-radius);
91
+ @include border-top-radius(var(--#{$prefix}accordion-border-radius));
66
92
 
67
- .accordion-button {
68
- @include border-top-radius($accordion-inner-border-radius);
93
+ > .accordion-header .accordion-button {
94
+ @include border-top-radius(var(--#{$prefix}accordion-inner-border-radius));
69
95
  }
70
96
  }
71
97
 
@@ -75,22 +101,22 @@
75
101
 
76
102
  // Only set a border-radius on the last item if the accordion is collapsed
77
103
  &:last-of-type {
78
- @include border-bottom-radius($accordion-border-radius);
104
+ @include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
79
105
 
80
- .accordion-button {
106
+ > .accordion-header .accordion-button {
81
107
  &.collapsed {
82
- @include border-bottom-radius($accordion-inner-border-radius);
108
+ @include border-bottom-radius(var(--#{$prefix}accordion-inner-border-radius));
83
109
  }
84
110
  }
85
111
 
86
- .accordion-collapse {
87
- @include border-bottom-radius($accordion-border-radius);
112
+ > .accordion-collapse {
113
+ @include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
88
114
  }
89
115
  }
90
116
  }
91
117
 
92
118
  .accordion-body {
93
- padding: $accordion-body-padding-y $accordion-body-padding-x;
119
+ padding: var(--#{$prefix}accordion-body-padding-y) var(--#{$prefix}accordion-body-padding-x);
94
120
  }
95
121
 
96
122
 
@@ -99,11 +125,7 @@
99
125
  // Remove borders and border-radius to keep accordion items edge-to-edge.
100
126
 
101
127
  .accordion-flush {
102
- .accordion-collapse {
103
- border-width: 0;
104
- }
105
-
106
- .accordion-item {
128
+ > .accordion-item {
107
129
  border-right: 0;
108
130
  border-left: 0;
109
131
  @include border-radius(0);
@@ -111,8 +133,26 @@
111
133
  &:first-child { border-top: 0; }
112
134
  &:last-child { border-bottom: 0; }
113
135
 
114
- .accordion-button {
136
+ // stylelint-disable selector-max-class
137
+ > .accordion-header .accordion-button {
138
+ &,
139
+ &.collapsed {
140
+ @include border-radius(0);
141
+ }
142
+ }
143
+ // stylelint-enable selector-max-class
144
+
145
+ > .accordion-collapse {
115
146
  @include border-radius(0);
116
147
  }
117
148
  }
118
149
  }
150
+
151
+ @if $enable-dark-mode {
152
+ @include color-mode(dark) {
153
+ .accordion-button::after {
154
+ --#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon-dark)};
155
+ --#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon-dark)};
156
+ }
157
+ }
158
+ }
@@ -3,11 +3,25 @@
3
3
  //
4
4
 
5
5
  .alert {
6
+ // scss-docs-start alert-css-vars
7
+ --#{$prefix}alert-bg: transparent;
8
+ --#{$prefix}alert-padding-x: #{$alert-padding-x};
9
+ --#{$prefix}alert-padding-y: #{$alert-padding-y};
10
+ --#{$prefix}alert-margin-bottom: #{$alert-margin-bottom};
11
+ --#{$prefix}alert-color: inherit;
12
+ --#{$prefix}alert-border-color: transparent;
13
+ --#{$prefix}alert-border: #{$alert-border-width} solid var(--#{$prefix}alert-border-color);
14
+ --#{$prefix}alert-border-radius: #{$alert-border-radius};
15
+ --#{$prefix}alert-link-color: inherit;
16
+ // scss-docs-end alert-css-vars
17
+
6
18
  position: relative;
7
- padding: $alert-padding-y $alert-padding-x;
8
- margin-bottom: $alert-margin-bottom;
9
- border: $alert-border-width solid transparent;
10
- @include border-radius($alert-border-radius);
19
+ padding: var(--#{$prefix}alert-padding-y) var(--#{$prefix}alert-padding-x);
20
+ margin-bottom: var(--#{$prefix}alert-margin-bottom);
21
+ color: var(--#{$prefix}alert-color);
22
+ background-color: var(--#{$prefix}alert-bg);
23
+ border: var(--#{$prefix}alert-border);
24
+ @include border-radius(var(--#{$prefix}alert-border-radius));
11
25
  }
12
26
 
13
27
  // Headings for larger alerts
@@ -19,6 +33,7 @@
19
33
  // Provide class for links that match alerts
20
34
  .alert-link {
21
35
  font-weight: $alert-link-font-weight;
36
+ color: var(--#{$prefix}alert-link-color);
22
37
  }
23
38
 
24
39
 
@@ -41,17 +56,13 @@
41
56
 
42
57
 
43
58
  // scss-docs-start alert-modifiers
44
- // Generate contextual modifier classes for colorizing the alert.
45
-
46
- @each $state, $value in $theme-colors {
47
- $alert-background: shift-color($value, $alert-bg-scale);
48
- $alert-border: shift-color($value, $alert-border-scale);
49
- $alert-color: shift-color($value, $alert-color-scale);
50
- @if (contrast-ratio($alert-background, $alert-color) < $min-contrast-ratio) {
51
- $alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale));
52
- }
59
+ // Generate contextual modifier classes for colorizing the alert
60
+ @each $state in map-keys($theme-colors) {
53
61
  .alert-#{$state} {
54
- @include alert-variant($alert-background, $alert-border, $alert-color);
62
+ --#{$prefix}alert-color: var(--#{$prefix}#{$state}-text-emphasis);
63
+ --#{$prefix}alert-bg: var(--#{$prefix}#{$state}-bg-subtle);
64
+ --#{$prefix}alert-border-color: var(--#{$prefix}#{$state}-border-subtle);
65
+ --#{$prefix}alert-link-color: var(--#{$prefix}#{$state}-text-emphasis);
55
66
  }
56
67
  }
57
68
  // scss-docs-end alert-modifiers
@@ -4,16 +4,25 @@
4
4
  // `background-color`.
5
5
 
6
6
  .badge {
7
+ // scss-docs-start badge-css-vars
8
+ --#{$prefix}badge-padding-x: #{$badge-padding-x};
9
+ --#{$prefix}badge-padding-y: #{$badge-padding-y};
10
+ @include rfs($badge-font-size, --#{$prefix}badge-font-size);
11
+ --#{$prefix}badge-font-weight: #{$badge-font-weight};
12
+ --#{$prefix}badge-color: #{$badge-color};
13
+ --#{$prefix}badge-border-radius: #{$badge-border-radius};
14
+ // scss-docs-end badge-css-vars
15
+
7
16
  display: inline-block;
8
- padding: $badge-padding-y $badge-padding-x;
9
- @include font-size($badge-font-size);
10
- font-weight: $badge-font-weight;
17
+ padding: var(--#{$prefix}badge-padding-y) var(--#{$prefix}badge-padding-x);
18
+ @include font-size(var(--#{$prefix}badge-font-size));
19
+ font-weight: var(--#{$prefix}badge-font-weight);
11
20
  line-height: 1;
12
- color: $badge-color;
21
+ color: var(--#{$prefix}badge-color);
13
22
  text-align: center;
14
23
  white-space: nowrap;
15
24
  vertical-align: baseline;
16
- @include border-radius($badge-border-radius);
25
+ @include border-radius(var(--#{$prefix}badge-border-radius));
17
26
  @include gradient-bg();
18
27
 
19
28
  // Empty badges collapse automatically
@@ -1,28 +1,40 @@
1
1
  .breadcrumb {
2
+ // scss-docs-start breadcrumb-css-vars
3
+ --#{$prefix}breadcrumb-padding-x: #{$breadcrumb-padding-x};
4
+ --#{$prefix}breadcrumb-padding-y: #{$breadcrumb-padding-y};
5
+ --#{$prefix}breadcrumb-margin-bottom: #{$breadcrumb-margin-bottom};
6
+ @include rfs($breadcrumb-font-size, --#{$prefix}breadcrumb-font-size);
7
+ --#{$prefix}breadcrumb-bg: #{$breadcrumb-bg};
8
+ --#{$prefix}breadcrumb-border-radius: #{$breadcrumb-border-radius};
9
+ --#{$prefix}breadcrumb-divider-color: #{$breadcrumb-divider-color};
10
+ --#{$prefix}breadcrumb-item-padding-x: #{$breadcrumb-item-padding-x};
11
+ --#{$prefix}breadcrumb-item-active-color: #{$breadcrumb-active-color};
12
+ // scss-docs-end breadcrumb-css-vars
13
+
2
14
  display: flex;
3
15
  flex-wrap: wrap;
4
- padding: $breadcrumb-padding-y $breadcrumb-padding-x;
5
- margin-bottom: $breadcrumb-margin-bottom;
6
- @include font-size($breadcrumb-font-size);
16
+ padding: var(--#{$prefix}breadcrumb-padding-y) var(--#{$prefix}breadcrumb-padding-x);
17
+ margin-bottom: var(--#{$prefix}breadcrumb-margin-bottom);
18
+ @include font-size(var(--#{$prefix}breadcrumb-font-size));
7
19
  list-style: none;
8
- background-color: $breadcrumb-bg;
9
- @include border-radius($breadcrumb-border-radius);
20
+ background-color: var(--#{$prefix}breadcrumb-bg);
21
+ @include border-radius(var(--#{$prefix}breadcrumb-border-radius));
10
22
  }
11
23
 
12
24
  .breadcrumb-item {
13
25
  // The separator between breadcrumbs (by default, a forward-slash: "/")
14
26
  + .breadcrumb-item {
15
- padding-left: $breadcrumb-item-padding-x;
27
+ padding-left: var(--#{$prefix}breadcrumb-item-padding-x);
16
28
 
17
29
  &::before {
18
30
  float: left; // Suppress inline spacings and underlining of the separator
19
- padding-right: $breadcrumb-item-padding-x;
20
- color: $breadcrumb-divider-color;
21
- content: var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"};
31
+ padding-right: var(--#{$prefix}breadcrumb-item-padding-x);
32
+ color: var(--#{$prefix}breadcrumb-divider-color);
33
+ content: var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"};
22
34
  }
23
35
  }
24
36
 
25
37
  &.active {
26
- color: $breadcrumb-active-color;
38
+ color: var(--#{$prefix}breadcrumb-item-active-color);
27
39
  }
28
40
  }
@@ -34,14 +34,17 @@
34
34
  }
35
35
 
36
36
  .btn-group {
37
+ @include border-radius($btn-border-radius);
38
+
37
39
  // Prevent double borders when buttons are next to each other
38
- > .btn:not(:first-child),
40
+ > :not(.btn-check:first-child) + .btn,
39
41
  > .btn-group:not(:first-child) {
40
- margin-left: -$btn-border-width;
42
+ margin-left: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
41
43
  }
42
44
 
43
45
  // Reset rounded corners
44
46
  > .btn:not(:last-child):not(.dropdown-toggle),
47
+ > .btn.dropdown-toggle-split:first-child,
45
48
  > .btn-group:not(:last-child) > .btn {
46
49
  @include border-end-radius(0);
47
50
  }
@@ -123,7 +126,7 @@
123
126
 
124
127
  > .btn:not(:first-child),
125
128
  > .btn-group:not(:first-child) {
126
- margin-top: -$btn-border-width;
129
+ margin-top: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
127
130
  }
128
131
 
129
132
  // Reset rounded corners
@@ -3,49 +3,121 @@
3
3
  //
4
4
 
5
5
  .btn {
6
+ // scss-docs-start btn-css-vars
7
+ --#{$prefix}btn-padding-x: #{$btn-padding-x};
8
+ --#{$prefix}btn-padding-y: #{$btn-padding-y};
9
+ --#{$prefix}btn-font-family: #{$btn-font-family};
10
+ @include rfs($btn-font-size, --#{$prefix}btn-font-size);
11
+ --#{$prefix}btn-font-weight: #{$btn-font-weight};
12
+ --#{$prefix}btn-line-height: #{$btn-line-height};
13
+ --#{$prefix}btn-color: #{$btn-color};
14
+ --#{$prefix}btn-bg: transparent;
15
+ --#{$prefix}btn-border-width: #{$btn-border-width};
16
+ --#{$prefix}btn-border-color: transparent;
17
+ --#{$prefix}btn-border-radius: #{$btn-border-radius};
18
+ --#{$prefix}btn-hover-border-color: transparent;
19
+ --#{$prefix}btn-box-shadow: #{$btn-box-shadow};
20
+ --#{$prefix}btn-disabled-opacity: #{$btn-disabled-opacity};
21
+ --#{$prefix}btn-focus-box-shadow: 0 0 0 #{$btn-focus-width} rgba(var(--#{$prefix}btn-focus-shadow-rgb), .5);
22
+ // scss-docs-end btn-css-vars
23
+
6
24
  display: inline-block;
7
- font-family: $btn-font-family;
8
- font-weight: $btn-font-weight;
9
- line-height: $btn-line-height;
10
- color: $body-color;
25
+ padding: var(--#{$prefix}btn-padding-y) var(--#{$prefix}btn-padding-x);
26
+ font-family: var(--#{$prefix}btn-font-family);
27
+ @include font-size(var(--#{$prefix}btn-font-size));
28
+ font-weight: var(--#{$prefix}btn-font-weight);
29
+ line-height: var(--#{$prefix}btn-line-height);
30
+ color: var(--#{$prefix}btn-color);
11
31
  text-align: center;
12
32
  text-decoration: if($link-decoration == none, null, none);
13
33
  white-space: $btn-white-space;
14
34
  vertical-align: middle;
15
35
  cursor: if($enable-button-pointers, pointer, null);
16
36
  user-select: none;
17
- background-color: transparent;
18
- border: $btn-border-width solid transparent;
19
- @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-border-radius);
37
+ border: var(--#{$prefix}btn-border-width) solid var(--#{$prefix}btn-border-color);
38
+ @include border-radius(var(--#{$prefix}btn-border-radius));
39
+ @include gradient-bg(var(--#{$prefix}btn-bg));
40
+ @include box-shadow(var(--#{$prefix}btn-box-shadow));
20
41
  @include transition($btn-transition);
21
42
 
22
43
  &:hover {
23
- color: $body-color;
44
+ color: var(--#{$prefix}btn-hover-color);
24
45
  text-decoration: if($link-hover-decoration == underline, none, null);
46
+ background-color: var(--#{$prefix}btn-hover-bg);
47
+ border-color: var(--#{$prefix}btn-hover-border-color);
48
+ }
49
+
50
+ .btn-check + &:hover {
51
+ // override for the checkbox/radio buttons
52
+ color: var(--#{$prefix}btn-color);
53
+ background-color: var(--#{$prefix}btn-bg);
54
+ border-color: var(--#{$prefix}btn-border-color);
25
55
  }
26
56
 
27
- .btn-check:focus + &,
28
- &:focus {
57
+ &:focus-visible {
58
+ color: var(--#{$prefix}btn-hover-color);
59
+ @include gradient-bg(var(--#{$prefix}btn-hover-bg));
60
+ border-color: var(--#{$prefix}btn-hover-border-color);
29
61
  outline: 0;
30
- box-shadow: $btn-focus-box-shadow;
62
+ // Avoid using mixin so we can pass custom focus shadow properly
63
+ @if $enable-shadows {
64
+ box-shadow: var(--#{$prefix}btn-box-shadow), var(--#{$prefix}btn-focus-box-shadow);
65
+ } @else {
66
+ box-shadow: var(--#{$prefix}btn-focus-box-shadow);
67
+ }
68
+ }
69
+
70
+ .btn-check:focus-visible + & {
71
+ border-color: var(--#{$prefix}btn-hover-border-color);
72
+ outline: 0;
73
+ // Avoid using mixin so we can pass custom focus shadow properly
74
+ @if $enable-shadows {
75
+ box-shadow: var(--#{$prefix}btn-box-shadow), var(--#{$prefix}btn-focus-box-shadow);
76
+ } @else {
77
+ box-shadow: var(--#{$prefix}btn-focus-box-shadow);
78
+ }
31
79
  }
32
80
 
33
81
  .btn-check:checked + &,
34
- .btn-check:active + &,
35
- &:active,
36
- &.active {
37
- @include box-shadow($btn-active-box-shadow);
82
+ :not(.btn-check) + &:active,
83
+ &:first-child:active,
84
+ &.active,
85
+ &.show {
86
+ color: var(--#{$prefix}btn-active-color);
87
+ background-color: var(--#{$prefix}btn-active-bg);
88
+ // Remove CSS gradients if they're enabled
89
+ background-image: if($enable-gradients, none, null);
90
+ border-color: var(--#{$prefix}btn-active-border-color);
91
+ @include box-shadow(var(--#{$prefix}btn-active-shadow));
92
+
93
+ &:focus-visible {
94
+ // Avoid using mixin so we can pass custom focus shadow properly
95
+ @if $enable-shadows {
96
+ box-shadow: var(--#{$prefix}btn-active-shadow), var(--#{$prefix}btn-focus-box-shadow);
97
+ } @else {
98
+ box-shadow: var(--#{$prefix}btn-focus-box-shadow);
99
+ }
100
+ }
101
+ }
38
102
 
39
- &:focus {
40
- @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
103
+ .btn-check:checked:focus-visible + & {
104
+ // Avoid using mixin so we can pass custom focus shadow properly
105
+ @if $enable-shadows {
106
+ box-shadow: var(--#{$prefix}btn-active-shadow), var(--#{$prefix}btn-focus-box-shadow);
107
+ } @else {
108
+ box-shadow: var(--#{$prefix}btn-focus-box-shadow);
41
109
  }
42
110
  }
43
111
 
44
112
  &:disabled,
45
113
  &.disabled,
46
114
  fieldset:disabled & {
115
+ color: var(--#{$prefix}btn-disabled-color);
47
116
  pointer-events: none;
48
- opacity: $btn-disabled-opacity;
117
+ background-color: var(--#{$prefix}btn-disabled-bg);
118
+ background-image: if($enable-gradients, none, null);
119
+ border-color: var(--#{$prefix}btn-disabled-border-color);
120
+ opacity: var(--#{$prefix}btn-disabled-opacity);
49
121
  @include box-shadow(none);
50
122
  }
51
123
  }
@@ -58,7 +130,27 @@
58
130
  // scss-docs-start btn-variant-loops
59
131
  @each $color, $value in $theme-colors {
60
132
  .btn-#{$color} {
61
- @include button-variant($value, $value);
133
+ @if $color == "light" {
134
+ @include button-variant(
135
+ $value,
136
+ $value,
137
+ $hover-background: shade-color($value, $btn-hover-bg-shade-amount),
138
+ $hover-border: shade-color($value, $btn-hover-border-shade-amount),
139
+ $active-background: shade-color($value, $btn-active-bg-shade-amount),
140
+ $active-border: shade-color($value, $btn-active-border-shade-amount)
141
+ );
142
+ } @else if $color == "dark" {
143
+ @include button-variant(
144
+ $value,
145
+ $value,
146
+ $hover-background: tint-color($value, $btn-hover-bg-tint-amount),
147
+ $hover-border: tint-color($value, $btn-hover-border-tint-amount),
148
+ $active-background: tint-color($value, $btn-active-bg-tint-amount),
149
+ $active-border: tint-color($value, $btn-active-border-tint-amount)
150
+ );
151
+ } @else {
152
+ @include button-variant($value, $value);
153
+ }
62
154
  }
63
155
  }
64
156
 
@@ -76,22 +168,35 @@
76
168
 
77
169
  // Make a button look and behave like a link
78
170
  .btn-link {
79
- font-weight: $font-weight-normal;
80
- color: $btn-link-color;
171
+ --#{$prefix}btn-font-weight: #{$font-weight-normal};
172
+ --#{$prefix}btn-color: #{$btn-link-color};
173
+ --#{$prefix}btn-bg: transparent;
174
+ --#{$prefix}btn-border-color: transparent;
175
+ --#{$prefix}btn-hover-color: #{$btn-link-hover-color};
176
+ --#{$prefix}btn-hover-border-color: transparent;
177
+ --#{$prefix}btn-active-color: #{$btn-link-hover-color};
178
+ --#{$prefix}btn-active-border-color: transparent;
179
+ --#{$prefix}btn-disabled-color: #{$btn-link-disabled-color};
180
+ --#{$prefix}btn-disabled-border-color: transparent;
181
+ --#{$prefix}btn-box-shadow: 0 0 0 #000; // Can't use `none` as keyword negates all values when used with multiple shadows
182
+ --#{$prefix}btn-focus-shadow-rgb: #{$btn-link-focus-shadow-rgb};
183
+
81
184
  text-decoration: $link-decoration;
185
+ @if $enable-gradients {
186
+ background-image: none;
187
+ }
82
188
 
83
- &:hover {
84
- color: $btn-link-hover-color;
189
+ &:hover,
190
+ &:focus-visible {
85
191
  text-decoration: $link-hover-decoration;
86
192
  }
87
193
 
88
- &:focus {
89
- text-decoration: $link-hover-decoration;
194
+ &:focus-visible {
195
+ color: var(--#{$prefix}btn-color);
90
196
  }
91
197
 
92
- &:disabled,
93
- &.disabled {
94
- color: $btn-link-disabled-color;
198
+ &:hover {
199
+ color: var(--#{$prefix}btn-hover-color);
95
200
  }
96
201
 
97
202
  // No need for an active state here