bootstrap 4.6.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -1
  3. data/README.md +7 -4
  4. data/assets/javascripts/bootstrap/alert.js +181 -109
  5. data/assets/javascripts/bootstrap/base-component.js +63 -0
  6. data/assets/javascripts/bootstrap/button.js +85 -173
  7. data/assets/javascripts/bootstrap/carousel.js +458 -355
  8. data/assets/javascripts/bootstrap/collapse.js +366 -218
  9. data/assets/javascripts/bootstrap/dom/data.js +68 -0
  10. data/assets/javascripts/bootstrap/dom/event-handler.js +322 -0
  11. data/assets/javascripts/bootstrap/dom/manipulator.js +88 -0
  12. data/assets/javascripts/bootstrap/dom/selector-engine.js +85 -0
  13. data/assets/javascripts/bootstrap/dropdown.js +459 -351
  14. data/assets/javascripts/bootstrap/modal.js +597 -429
  15. data/assets/javascripts/bootstrap/offcanvas.js +671 -0
  16. data/assets/javascripts/bootstrap/popover.js +130 -154
  17. data/assets/javascripts/bootstrap/scrollspy.js +238 -188
  18. data/assets/javascripts/bootstrap/tab.js +235 -137
  19. data/assets/javascripts/bootstrap/toast.js +210 -148
  20. data/assets/javascripts/bootstrap/tooltip.js +627 -466
  21. data/assets/javascripts/bootstrap-global-this-define.js +6 -0
  22. data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
  23. data/assets/javascripts/bootstrap-sprockets.js +15 -8
  24. data/assets/javascripts/bootstrap.js +3174 -2563
  25. data/assets/javascripts/bootstrap.min.js +2 -2
  26. data/assets/stylesheets/_bootstrap-grid.scss +51 -16
  27. data/assets/stylesheets/_bootstrap-reboot.scss +4 -1
  28. data/assets/stylesheets/_bootstrap.scss +16 -8
  29. data/assets/stylesheets/bootstrap/_accordion.scss +118 -0
  30. data/assets/stylesheets/bootstrap/_alert.scss +15 -10
  31. data/assets/stylesheets/bootstrap/_badge.scss +2 -27
  32. data/assets/stylesheets/bootstrap/_breadcrumb.scss +3 -17
  33. data/assets/stylesheets/bootstrap/_button-group.scss +21 -45
  34. data/assets/stylesheets/bootstrap/_buttons.scss +29 -60
  35. data/assets/stylesheets/bootstrap/_card.scss +20 -91
  36. data/assets/stylesheets/bootstrap/_carousel.scss +65 -33
  37. data/assets/stylesheets/bootstrap/_close.scss +30 -30
  38. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  39. data/assets/stylesheets/bootstrap/_dropdown.scss +84 -36
  40. data/assets/stylesheets/bootstrap/_forms.scss +9 -347
  41. data/assets/stylesheets/bootstrap/_functions.scss +84 -23
  42. data/assets/stylesheets/bootstrap/_grid.scss +3 -54
  43. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  44. data/assets/stylesheets/bootstrap/_list-group.scss +28 -8
  45. data/assets/stylesheets/bootstrap/_mixins.scss +8 -13
  46. data/assets/stylesheets/bootstrap/_modal.scss +43 -55
  47. data/assets/stylesheets/bootstrap/_nav.scss +23 -4
  48. data/assets/stylesheets/bootstrap/_navbar.scss +45 -71
  49. data/assets/stylesheets/bootstrap/_offcanvas.scss +77 -0
  50. data/assets/stylesheets/bootstrap/_pagination.scss +10 -20
  51. data/assets/stylesheets/bootstrap/_popover.scss +15 -27
  52. data/assets/stylesheets/bootstrap/_progress.scss +5 -4
  53. data/assets/stylesheets/bootstrap/_reboot.scss +316 -179
  54. data/assets/stylesheets/bootstrap/_root.scss +5 -8
  55. data/assets/stylesheets/bootstrap/_spinners.scss +11 -7
  56. data/assets/stylesheets/bootstrap/_tables.scss +79 -114
  57. data/assets/stylesheets/bootstrap/_toasts.scss +20 -15
  58. data/assets/stylesheets/bootstrap/_tooltip.scss +17 -17
  59. data/assets/stylesheets/bootstrap/_transitions.scss +2 -1
  60. data/assets/stylesheets/bootstrap/_type.scss +38 -59
  61. data/assets/stylesheets/bootstrap/_utilities.scss +594 -18
  62. data/assets/stylesheets/bootstrap/_variables.scss +800 -482
  63. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  64. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +61 -0
  65. data/assets/stylesheets/bootstrap/forms/_form-check.scss +152 -0
  66. data/assets/stylesheets/bootstrap/forms/_form-control.scss +219 -0
  67. data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
  68. data/assets/stylesheets/bootstrap/forms/_form-select.scss +67 -0
  69. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  70. data/assets/stylesheets/bootstrap/forms/_input-group.scss +121 -0
  71. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  72. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  73. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  74. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  75. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
  76. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  77. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  78. data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
  79. data/assets/stylesheets/bootstrap/mixins/_alert.scss +3 -5
  80. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +10 -8
  81. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
  82. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +14 -10
  83. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +71 -48
  84. data/assets/stylesheets/bootstrap/mixins/_caret.scss +10 -8
  85. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  86. data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
  87. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  88. data/assets/stylesheets/bootstrap/mixins/_forms.scss +38 -86
  89. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
  90. data/assets/stylesheets/bootstrap/mixins/_grid.scss +89 -33
  91. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
  92. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
  93. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  94. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +17 -8
  95. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
  96. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  97. data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
  98. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +68 -0
  99. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +29 -0
  100. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  101. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +234 -126
  102. data/bootstrap.gemspec +1 -3
  103. data/lib/bootstrap/version.rb +2 -2
  104. data/tasks/updater/js.rb +20 -5
  105. data/tasks/updater/network.rb +7 -1
  106. data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
  107. data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
  108. data/test/dummy_rails/app/views/pages/root.html +89 -0
  109. data/test/dummy_rails/config/application.rb +0 -3
  110. data/test/gemfiles/rails_6_1.gemfile +7 -0
  111. metadata +45 -73
  112. data/assets/javascripts/bootstrap/util.js +0 -192
  113. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  114. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -526
  115. data/assets/stylesheets/bootstrap/_input-group.scss +0 -208
  116. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
  117. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  118. data/assets/stylesheets/bootstrap/_print.scss +0 -141
  119. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
  120. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
  121. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
  122. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -80
  123. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  124. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
  125. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -34
  126. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
  127. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
  128. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
  129. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
  130. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
  131. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  132. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  133. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
  134. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
  135. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
  136. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  137. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
  138. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +0 -5
  139. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
  140. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
  141. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  142. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  143. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
  144. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
  145. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
  146. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
  147. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
  148. data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
  149. /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -27,26 +27,31 @@
27
27
  // Expand the right padding and account for the close button's positioning.
28
28
 
29
29
  .alert-dismissible {
30
- padding-right: $close-font-size + $alert-padding-x * 2;
30
+ padding-right: $alert-dismissible-padding-r;
31
31
 
32
32
  // Adjust close link position
33
- .close {
33
+ .btn-close {
34
34
  position: absolute;
35
35
  top: 0;
36
36
  right: 0;
37
- z-index: 2;
38
- padding: $alert-padding-y $alert-padding-x;
39
- color: inherit;
37
+ z-index: $stretched-link-z-index + 1;
38
+ padding: $alert-padding-y * 1.25 $alert-padding-x;
40
39
  }
41
40
  }
42
41
 
43
42
 
44
- // Alternate styles
45
- //
43
+ // scss-docs-start alert-modifiers
46
44
  // Generate contextual modifier classes for colorizing the alert.
47
45
 
48
- @each $color, $value in $theme-colors {
49
- .alert-#{$color} {
50
- @include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level));
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
+ }
53
+ .alert-#{$state} {
54
+ @include alert-variant($alert-background, $alert-border, $alert-color);
51
55
  }
52
56
  }
57
+ // scss-docs-end alert-modifiers
@@ -9,17 +9,12 @@
9
9
  @include font-size($badge-font-size);
10
10
  font-weight: $badge-font-weight;
11
11
  line-height: 1;
12
+ color: $badge-color;
12
13
  text-align: center;
13
14
  white-space: nowrap;
14
15
  vertical-align: baseline;
15
16
  @include border-radius($badge-border-radius);
16
- @include transition($badge-transition);
17
-
18
- @at-root a#{&} {
19
- @include hover-focus() {
20
- text-decoration: none;
21
- }
22
- }
17
+ @include gradient-bg();
23
18
 
24
19
  // Empty badges collapse automatically
25
20
  &:empty {
@@ -32,23 +27,3 @@
32
27
  position: relative;
33
28
  top: -1px;
34
29
  }
35
-
36
- // Pill badges
37
- //
38
- // Make them extra rounded with a modifier to replace v3's badges.
39
-
40
- .badge-pill {
41
- padding-right: $badge-pill-padding-x;
42
- padding-left: $badge-pill-padding-x;
43
- @include border-radius($badge-pill-border-radius);
44
- }
45
-
46
- // Colors
47
- //
48
- // Contextual variations (linked badges get darker on :hover).
49
-
50
- @each $color, $value in $theme-colors {
51
- .badge-#{$color} {
52
- @include badge-variant($value);
53
- }
54
- }
@@ -12,30 +12,16 @@
12
12
  .breadcrumb-item {
13
13
  // The separator between breadcrumbs (by default, a forward-slash: "/")
14
14
  + .breadcrumb-item {
15
- padding-left: $breadcrumb-item-padding;
15
+ padding-left: $breadcrumb-item-padding-x;
16
16
 
17
17
  &::before {
18
18
  float: left; // Suppress inline spacings and underlining of the separator
19
- padding-right: $breadcrumb-item-padding;
19
+ padding-right: $breadcrumb-item-padding-x;
20
20
  color: $breadcrumb-divider-color;
21
- content: escape-svg($breadcrumb-divider);
21
+ content: var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"};
22
22
  }
23
23
  }
24
24
 
25
- // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
26
- // without `<ul>`s. The `::before` pseudo-element generates an element
27
- // *within* the .breadcrumb-item and thereby inherits the `text-decoration`.
28
- //
29
- // To trick IE into suppressing the underline, we give the pseudo-element an
30
- // underline and then immediately remove it.
31
- + .breadcrumb-item:hover::before {
32
- text-decoration: underline;
33
- }
34
- // stylelint-disable-next-line no-duplicate-selectors
35
- + .breadcrumb-item:hover::before {
36
- text-decoration: none;
37
- }
38
-
39
25
  &.active {
40
26
  color: $breadcrumb-active-color;
41
27
  }
@@ -1,5 +1,3 @@
1
- // stylelint-disable selector-no-qualifying-type
2
-
3
1
  // Make the div behave like a button
4
2
  .btn-group,
5
3
  .btn-group-vertical {
@@ -10,17 +8,17 @@
10
8
  > .btn {
11
9
  position: relative;
12
10
  flex: 1 1 auto;
11
+ }
13
12
 
14
- // Bring the hover, focused, and "active" buttons to the front to overlay
15
- // the borders properly
16
- @include hover() {
17
- z-index: 1;
18
- }
19
- &:focus,
20
- &:active,
21
- &.active {
22
- z-index: 1;
23
- }
13
+ // Bring the hover, focused, and "active" buttons to the front to overlay
14
+ // the borders properly
15
+ > .btn-check:checked + .btn,
16
+ > .btn-check:focus + .btn,
17
+ > .btn:hover,
18
+ > .btn:focus,
19
+ > .btn:active,
20
+ > .btn.active {
21
+ z-index: 1;
24
22
  }
25
23
  }
26
24
 
@@ -45,12 +43,17 @@
45
43
  // Reset rounded corners
46
44
  > .btn:not(:last-child):not(.dropdown-toggle),
47
45
  > .btn-group:not(:last-child) > .btn {
48
- @include border-right-radius(0);
46
+ @include border-end-radius(0);
49
47
  }
50
48
 
51
- > .btn:not(:first-child),
49
+ // The left radius should be 0 if the button is:
50
+ // - the "third or more" child
51
+ // - the second child and the previous element isn't `.btn-check` (making it the first child visually)
52
+ // - part of a btn-group which isn't the first child
53
+ > .btn:nth-child(n + 3),
54
+ > :not(.btn-check) + .btn,
52
55
  > .btn-group:not(:first-child) > .btn {
53
- @include border-left-radius(0);
56
+ @include border-start-radius(0);
54
57
  }
55
58
  }
56
59
 
@@ -72,11 +75,11 @@
72
75
 
73
76
  &::after,
74
77
  .dropup &::after,
75
- .dropright &::after {
78
+ .dropend &::after {
76
79
  margin-left: 0;
77
80
  }
78
81
 
79
- .dropleft &::before {
82
+ .dropstart &::before {
80
83
  margin-right: 0;
81
84
  }
82
85
  }
@@ -129,35 +132,8 @@
129
132
  @include border-bottom-radius(0);
130
133
  }
131
134
 
132
- > .btn:not(:first-child),
135
+ > .btn ~ .btn,
133
136
  > .btn-group:not(:first-child) > .btn {
134
137
  @include border-top-radius(0);
135
138
  }
136
139
  }
137
-
138
-
139
- // Checkbox and radio options
140
- //
141
- // In order to support the browser's form validation feedback, powered by the
142
- // `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
143
- // `display: none;` or `visibility: hidden;` as that also hides the popover.
144
- // Simply visually hiding the inputs via `opacity` would leave them clickable in
145
- // certain cases which is prevented by using `clip` and `pointer-events`.
146
- // This way, we ensure a DOM element is visible to position the popover from.
147
- //
148
- // See https://github.com/twbs/bootstrap/pull/12794 and
149
- // https://github.com/twbs/bootstrap/pull/14559 for more information.
150
-
151
- .btn-group-toggle {
152
- > .btn,
153
- > .btn-group > .btn {
154
- margin-bottom: 0; // Override default `<label>` value
155
-
156
- input[type="radio"],
157
- input[type="checkbox"] {
158
- position: absolute;
159
- clip: rect(0, 0, 0, 0);
160
- pointer-events: none;
161
- }
162
- }
163
- }
@@ -1,5 +1,3 @@
1
- // stylelint-disable selector-no-qualifying-type
2
-
3
1
  //
4
2
  // Base styles
5
3
  //
@@ -8,53 +6,48 @@
8
6
  display: inline-block;
9
7
  font-family: $btn-font-family;
10
8
  font-weight: $btn-font-weight;
9
+ line-height: $btn-line-height;
11
10
  color: $body-color;
12
11
  text-align: center;
13
12
  text-decoration: if($link-decoration == none, null, none);
14
13
  white-space: $btn-white-space;
15
14
  vertical-align: middle;
15
+ cursor: if($enable-button-pointers, pointer, null);
16
16
  user-select: none;
17
17
  background-color: transparent;
18
18
  border: $btn-border-width solid transparent;
19
- @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
19
+ @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-border-radius);
20
20
  @include transition($btn-transition);
21
21
 
22
- @include hover() {
22
+ &:hover {
23
23
  color: $body-color;
24
- text-decoration: none;
24
+ text-decoration: if($link-hover-decoration == underline, none, null);
25
25
  }
26
26
 
27
- &:focus,
28
- &.focus {
27
+ .btn-check:focus + &,
28
+ &:focus {
29
29
  outline: 0;
30
30
  box-shadow: $btn-focus-box-shadow;
31
31
  }
32
32
 
33
- // Disabled comes first so active can properly restyle
34
- &.disabled,
35
- &:disabled {
36
- opacity: $btn-disabled-opacity;
37
- @include box-shadow(none);
38
- }
39
-
40
- &:not(:disabled):not(.disabled) {
41
- cursor: if($enable-pointer-cursor-for-buttons, pointer, null);
42
-
43
- &:active,
44
- &.active {
45
- @include box-shadow($btn-active-box-shadow);
33
+ .btn-check:checked + &,
34
+ .btn-check:active + &,
35
+ &:active,
36
+ &.active {
37
+ @include box-shadow($btn-active-box-shadow);
46
38
 
47
- &:focus {
48
- @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
49
- }
39
+ &:focus {
40
+ @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
50
41
  }
51
42
  }
52
- }
53
43
 
54
- // Future-proof disabling of clicks on `<a>` elements
55
- a.btn.disabled,
56
- fieldset:disabled a.btn {
57
- pointer-events: none;
44
+ &:disabled,
45
+ &.disabled,
46
+ fieldset:disabled & {
47
+ pointer-events: none;
48
+ opacity: $btn-disabled-opacity;
49
+ @include box-shadow(none);
50
+ }
58
51
  }
59
52
 
60
53
 
@@ -62,6 +55,7 @@ fieldset:disabled a.btn {
62
55
  // Alternate buttons
63
56
  //
64
57
 
58
+ // scss-docs-start btn-variant-loops
65
59
  @each $color, $value in $theme-colors {
66
60
  .btn-#{$color} {
67
61
  @include button-variant($value, $value);
@@ -73,6 +67,7 @@ fieldset:disabled a.btn {
73
67
  @include button-outline-variant($value);
74
68
  }
75
69
  }
70
+ // scss-docs-end btn-variant-loops
76
71
 
77
72
 
78
73
  //
@@ -82,23 +77,21 @@ fieldset:disabled a.btn {
82
77
  // Make a button look and behave like a link
83
78
  .btn-link {
84
79
  font-weight: $font-weight-normal;
85
- color: $link-color;
80
+ color: $btn-link-color;
86
81
  text-decoration: $link-decoration;
87
82
 
88
- @include hover() {
89
- color: $link-hover-color;
83
+ &:hover {
84
+ color: $btn-link-hover-color;
90
85
  text-decoration: $link-hover-decoration;
91
86
  }
92
87
 
93
- &:focus,
94
- &.focus {
88
+ &:focus {
95
89
  text-decoration: $link-hover-decoration;
96
90
  }
97
91
 
98
92
  &:disabled,
99
93
  &.disabled {
100
94
  color: $btn-link-disabled-color;
101
- pointer-events: none;
102
95
  }
103
96
 
104
97
  // No need for an active state here
@@ -110,33 +103,9 @@ fieldset:disabled a.btn {
110
103
  //
111
104
 
112
105
  .btn-lg {
113
- @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
106
+ @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-border-radius-lg);
114
107
  }
115
108
 
116
109
  .btn-sm {
117
- @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
118
- }
119
-
120
-
121
- //
122
- // Block button
123
- //
124
-
125
- .btn-block {
126
- display: block;
127
- width: 100%;
128
-
129
- // Vertically space out multiple block buttons
130
- + .btn-block {
131
- margin-top: $btn-block-spacing-y;
132
- }
133
- }
134
-
135
- // Specificity overrides
136
- input[type="submit"],
137
- input[type="reset"],
138
- input[type="button"] {
139
- &.btn-block {
140
- width: 100%;
141
- }
110
+ @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm);
142
111
  }
@@ -46,19 +46,16 @@
46
46
  // Enable `flex-grow: 1` for decks and groups so that card blocks take up
47
47
  // as much space as possible, ensuring footers are aligned to the bottom.
48
48
  flex: 1 1 auto;
49
- // Workaround for the image size bug in IE
50
- // See: https://github.com/twbs/bootstrap/pull/28855
51
- min-height: 1px;
52
- padding: $card-spacer-x;
49
+ padding: $card-spacer-y $card-spacer-x;
53
50
  color: $card-color;
54
51
  }
55
52
 
56
53
  .card-title {
57
- margin-bottom: $card-spacer-y;
54
+ margin-bottom: $card-title-spacer-y;
58
55
  }
59
56
 
60
57
  .card-subtitle {
61
- margin-top: -$card-spacer-y / 2;
58
+ margin-top: -$card-title-spacer-y / 2;
62
59
  margin-bottom: 0;
63
60
  }
64
61
 
@@ -67,7 +64,7 @@
67
64
  }
68
65
 
69
66
  .card-link {
70
- @include hover() {
67
+ &:hover {
71
68
  text-decoration: none;
72
69
  }
73
70
 
@@ -81,7 +78,7 @@
81
78
  //
82
79
 
83
80
  .card-header {
84
- padding: $card-spacer-y $card-spacer-x;
81
+ padding: $card-cap-padding-y $card-cap-padding-x;
85
82
  margin-bottom: 0; // Removes the default margin-bottom of <hN>
86
83
  color: $card-cap-color;
87
84
  background-color: $card-cap-bg;
@@ -93,7 +90,7 @@
93
90
  }
94
91
 
95
92
  .card-footer {
96
- padding: $card-spacer-y $card-spacer-x;
93
+ padding: $card-cap-padding-y $card-cap-padding-x;
97
94
  color: $card-cap-color;
98
95
  background-color: $card-cap-bg;
99
96
  border-top: $card-border-width solid $card-border-color;
@@ -109,15 +106,22 @@
109
106
  //
110
107
 
111
108
  .card-header-tabs {
112
- margin-right: -$card-spacer-x / 2;
113
- margin-bottom: -$card-spacer-y;
114
- margin-left: -$card-spacer-x / 2;
109
+ margin-right: -$card-cap-padding-x / 2;
110
+ margin-bottom: -$card-cap-padding-y;
111
+ margin-left: -$card-cap-padding-x / 2;
115
112
  border-bottom: 0;
113
+
114
+ @if $nav-tabs-link-active-bg != $card-bg {
115
+ .nav-link.active {
116
+ background-color: $card-bg;
117
+ border-bottom-color: $card-bg;
118
+ }
119
+ }
116
120
  }
117
121
 
118
122
  .card-header-pills {
119
- margin-right: -$card-spacer-x / 2;
120
- margin-left: -$card-spacer-x / 2;
123
+ margin-right: -$card-cap-padding-x / 2;
124
+ margin-left: -$card-cap-padding-x / 2;
121
125
  }
122
126
 
123
127
  // Card image
@@ -134,7 +138,6 @@
134
138
  .card-img,
135
139
  .card-img-top,
136
140
  .card-img-bottom {
137
- flex-shrink: 0; // For IE: https://github.com/twbs/bootstrap/issues/29396
138
141
  width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
139
142
  }
140
143
 
@@ -149,30 +152,6 @@
149
152
  }
150
153
 
151
154
 
152
- // Card deck
153
-
154
- .card-deck {
155
- .card {
156
- margin-bottom: $card-deck-margin;
157
- }
158
-
159
- @include media-breakpoint-up(sm) {
160
- display: flex;
161
- flex-flow: row wrap;
162
- margin-right: -$card-deck-margin;
163
- margin-left: -$card-deck-margin;
164
-
165
- .card {
166
- // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
167
- flex: 1 0 0%;
168
- margin-right: $card-deck-margin;
169
- margin-bottom: 0; // Override the default
170
- margin-left: $card-deck-margin;
171
- }
172
- }
173
- }
174
-
175
-
176
155
  //
177
156
  // Card groups
178
157
  //
@@ -202,7 +181,7 @@
202
181
  // Handle rounded corners
203
182
  @if $enable-rounded {
204
183
  &:not(:last-child) {
205
- @include border-right-radius(0);
184
+ @include border-end-radius(0);
206
185
 
207
186
  .card-img-top,
208
187
  .card-header {
@@ -217,7 +196,7 @@
217
196
  }
218
197
 
219
198
  &:not(:first-child) {
220
- @include border-left-radius(0);
199
+ @include border-start-radius(0);
221
200
 
222
201
  .card-img-top,
223
202
  .card-header {
@@ -234,53 +213,3 @@
234
213
  }
235
214
  }
236
215
  }
237
-
238
-
239
- //
240
- // Columns
241
- //
242
-
243
- .card-columns {
244
- .card {
245
- margin-bottom: $card-columns-margin;
246
- }
247
-
248
- @include media-breakpoint-up(sm) {
249
- column-count: $card-columns-count;
250
- column-gap: $card-columns-gap;
251
- orphans: 1;
252
- widows: 1;
253
-
254
- .card {
255
- display: inline-block; // Don't let them vertically span multiple columns
256
- width: 100%; // Don't let their width change
257
- }
258
- }
259
- }
260
-
261
-
262
- //
263
- // Accordion
264
- //
265
-
266
- .accordion {
267
- overflow-anchor: none;
268
-
269
- > .card {
270
- overflow: hidden;
271
-
272
- &:not(:last-of-type) {
273
- border-bottom: 0;
274
- @include border-bottom-radius(0);
275
- }
276
-
277
- &:not(:first-of-type) {
278
- @include border-top-radius(0);
279
- }
280
-
281
- > .card-header {
282
- @include border-radius(0);
283
- margin-bottom: -$card-border-width;
284
- }
285
- }
286
- }