bootstrap 4.3.0 → 5.0.0.alpha1

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 (139) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -1
  3. data/CHANGELOG.md +2 -14
  4. data/README.md +1 -1
  5. data/assets/javascripts/bootstrap-sprockets.js +5 -1
  6. data/assets/javascripts/bootstrap.js +2292 -1514
  7. data/assets/javascripts/bootstrap.min.js +4 -4
  8. data/assets/javascripts/bootstrap/alert.js +148 -85
  9. data/assets/javascripts/bootstrap/button.js +69 -110
  10. data/assets/javascripts/bootstrap/carousel.js +320 -239
  11. data/assets/javascripts/bootstrap/collapse.js +300 -177
  12. data/assets/javascripts/bootstrap/dom/data.js +81 -0
  13. data/assets/javascripts/bootstrap/dom/event-handler.js +311 -0
  14. data/assets/javascripts/bootstrap/dom/manipulator.js +100 -0
  15. data/assets/javascripts/bootstrap/dom/polyfill.js +110 -0
  16. data/assets/javascripts/bootstrap/dom/selector-engine.js +98 -0
  17. data/assets/javascripts/bootstrap/dropdown.js +282 -265
  18. data/assets/javascripts/bootstrap/modal.js +348 -231
  19. data/assets/javascripts/bootstrap/popover.js +80 -105
  20. data/assets/javascripts/bootstrap/scrollspy.js +173 -138
  21. data/assets/javascripts/bootstrap/tab.js +180 -115
  22. data/assets/javascripts/bootstrap/toast.js +188 -132
  23. data/assets/javascripts/bootstrap/tooltip.js +508 -230
  24. data/assets/stylesheets/_bootstrap-grid.scss +54 -18
  25. data/assets/stylesheets/_bootstrap-reboot.scss +7 -4
  26. data/assets/stylesheets/_bootstrap.scss +17 -11
  27. data/assets/stylesheets/bootstrap/_alert.scss +3 -3
  28. data/assets/stylesheets/bootstrap/_badge.scss +2 -27
  29. data/assets/stylesheets/bootstrap/_breadcrumb.scss +7 -18
  30. data/assets/stylesheets/bootstrap/_button-group.scss +16 -38
  31. data/assets/stylesheets/bootstrap/_buttons.scss +26 -39
  32. data/assets/stylesheets/bootstrap/_card.scss +48 -97
  33. data/assets/stylesheets/bootstrap/_carousel.scss +16 -18
  34. data/assets/stylesheets/bootstrap/_close.scss +9 -14
  35. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  36. data/assets/stylesheets/bootstrap/_dropdown.scss +13 -9
  37. data/assets/stylesheets/bootstrap/_forms.scss +9 -330
  38. data/assets/stylesheets/bootstrap/_functions.scss +141 -24
  39. data/assets/stylesheets/bootstrap/_grid.scss +4 -34
  40. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  41. data/assets/stylesheets/bootstrap/_images.scss +2 -2
  42. data/assets/stylesheets/bootstrap/_list-group.scss +41 -33
  43. data/assets/stylesheets/bootstrap/_mixins.scss +9 -15
  44. data/assets/stylesheets/bootstrap/_modal.scss +54 -48
  45. data/assets/stylesheets/bootstrap/_nav.scss +12 -9
  46. data/assets/stylesheets/bootstrap/_navbar.scss +54 -56
  47. data/assets/stylesheets/bootstrap/_pagination.scss +10 -22
  48. data/assets/stylesheets/bootstrap/_popover.scss +13 -14
  49. data/assets/stylesheets/bootstrap/_progress.scss +6 -4
  50. data/assets/stylesheets/bootstrap/_reboot.scss +318 -185
  51. data/assets/stylesheets/bootstrap/_root.scss +5 -8
  52. data/assets/stylesheets/bootstrap/_spinners.scss +3 -2
  53. data/assets/stylesheets/bootstrap/_tables.scss +80 -114
  54. data/assets/stylesheets/bootstrap/_tooltip.scss +5 -5
  55. data/assets/stylesheets/bootstrap/_transitions.scss +0 -1
  56. data/assets/stylesheets/bootstrap/_type.scss +40 -61
  57. data/assets/stylesheets/bootstrap/_utilities.scss +503 -17
  58. data/assets/stylesheets/bootstrap/_variables.scss +567 -430
  59. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  60. data/assets/stylesheets/bootstrap/forms/_form-check.scss +142 -0
  61. data/assets/stylesheets/bootstrap/forms/_form-control.scss +116 -0
  62. data/assets/stylesheets/bootstrap/forms/_form-file.scss +91 -0
  63. data/assets/stylesheets/bootstrap/forms/_form-range.scss +136 -0
  64. data/assets/stylesheets/bootstrap/forms/_form-select.scss +82 -0
  65. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  66. data/assets/stylesheets/bootstrap/forms/_input-group.scss +140 -0
  67. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  68. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  69. data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
  70. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  71. data/assets/stylesheets/bootstrap/helpers/_embed.scss +31 -0
  72. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  73. data/assets/stylesheets/bootstrap/helpers/_screenreaders.scss +8 -0
  74. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  75. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  76. data/assets/stylesheets/bootstrap/mixins/_alert.scss +0 -4
  77. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +26 -13
  78. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +11 -8
  79. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +68 -50
  80. data/assets/stylesheets/bootstrap/mixins/_caret.scss +4 -4
  81. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  82. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  83. data/assets/stylesheets/bootstrap/mixins/_forms.scss +47 -106
  84. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +9 -11
  85. data/assets/stylesheets/bootstrap/mixins/_grid.scss +99 -29
  86. data/assets/stylesheets/bootstrap/mixins/_image.scss +0 -20
  87. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -1
  88. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +15 -8
  89. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
  90. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +14 -19
  91. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  92. data/assets/stylesheets/bootstrap/mixins/_transition.scss +17 -7
  93. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +49 -0
  94. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  95. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +230 -130
  96. data/bootstrap.gemspec +1 -1
  97. data/lib/bootstrap/version.rb +2 -2
  98. data/tasks/updater/js.rb +3 -3
  99. data/tasks/updater/network.rb +2 -2
  100. data/test/dummy_rails/app/assets/config/manifest.js +3 -0
  101. data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
  102. data/test/gemfiles/rails_6_0.gemfile +7 -0
  103. data/test/support/dummy_rails_integration.rb +3 -1
  104. data/test/test_helper.rb +18 -13
  105. metadata +40 -42
  106. data/assets/javascripts/bootstrap/util.js +0 -171
  107. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  108. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -507
  109. data/assets/stylesheets/bootstrap/_input-group.scss +0 -193
  110. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
  111. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  112. data/assets/stylesheets/bootstrap/_print.scss +0 -141
  113. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -21
  114. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
  115. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
  116. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -66
  117. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  118. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
  119. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
  120. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
  121. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -16
  122. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
  123. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
  124. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  125. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  126. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
  127. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
  128. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
  129. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  130. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
  131. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
  132. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
  133. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  134. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  135. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
  136. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
  137. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
  138. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
  139. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
@@ -1,29 +1,65 @@
1
1
  /*!
2
- * Bootstrap Grid v4.3.0 (https://getbootstrap.com/)
3
- * Copyright 2011-2019 The Bootstrap Authors
4
- * Copyright 2011-2019 Twitter, Inc.
5
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2
+ * Bootstrap Grid v5.0.0-alpha1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2020 The Bootstrap Authors
4
+ * Copyright 2011-2020 Twitter, Inc.
5
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6
6
  */
7
7
 
8
- html {
9
- box-sizing: border-box;
10
- -ms-overflow-style: scrollbar;
11
- }
12
-
13
- *,
14
- *::before,
15
- *::after {
16
- box-sizing: inherit;
17
- }
8
+ $include-column-box-sizing: true !default;
18
9
 
19
10
  @import "bootstrap/functions";
20
11
  @import "bootstrap/variables";
21
12
 
13
+ @import "bootstrap/mixins/lists";
22
14
  @import "bootstrap/mixins/breakpoints";
23
- @import "bootstrap/mixins/grid-framework";
15
+ @import "bootstrap/mixins/container";
24
16
  @import "bootstrap/mixins/grid";
17
+ @import "bootstrap/mixins/utilities";
18
+
19
+ @import "bootstrap/vendor/rfs";
25
20
 
21
+ @import "bootstrap/containers";
26
22
  @import "bootstrap/grid";
27
- @import "bootstrap/utilities/display";
28
- @import "bootstrap/utilities/flex";
29
- @import "bootstrap/utilities/spacing";
23
+
24
+ @import "bootstrap/utilities";
25
+ // Only use the utilities we need
26
+ // stylelint-disable-next-line scss/dollar-variable-default
27
+ $utilities: map-get-multiple(
28
+ $utilities,
29
+ (
30
+ "bootstrap/display",
31
+ "bootstrap/order",
32
+ "bootstrap/flex",
33
+ "bootstrap/flex-direction",
34
+ "bootstrap/flex-grow",
35
+ "bootstrap/flex-shrink"
36
+ "bootstrap/flex-wrap",
37
+ "bootstrap/justify-content",
38
+ "bootstrap/align-items",
39
+ "bootstrap/align-content",
40
+ "bootstrap/align-self",
41
+ "bootstrap/margin",
42
+ "bootstrap/margin-x",
43
+ "bootstrap/margin-y",
44
+ "bootstrap/margin-top",
45
+ "bootstrap/margin-right",
46
+ "bootstrap/margin-bottom",
47
+ "bootstrap/margin-left",
48
+ "bootstrap/negative-margin",
49
+ "bootstrap/negative-margin-x",
50
+ "bootstrap/negative-margin-y",
51
+ "bootstrap/negative-margin-top",
52
+ "bootstrap/negative-margin-right",
53
+ "bootstrap/negative-margin-bottom",
54
+ "bootstrap/negative-margin-left",
55
+ "bootstrap/padding",
56
+ "bootstrap/padding-x",
57
+ "bootstrap/padding-y",
58
+ "bootstrap/padding-top",
59
+ "bootstrap/padding-right",
60
+ "bootstrap/padding-bottom",
61
+ "bootstrap/padding-left",
62
+ )
63
+ );
64
+
65
+ @import "bootstrap/utilities/api";
@@ -1,12 +1,15 @@
1
1
  /*!
2
- * Bootstrap Reboot v4.3.0 (https://getbootstrap.com/)
3
- * Copyright 2011-2019 The Bootstrap Authors
4
- * Copyright 2011-2019 Twitter, Inc.
5
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2
+ * Bootstrap Reboot v5.0.0-alpha1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2020 The Bootstrap Authors
4
+ * Copyright 2011-2020 Twitter, Inc.
5
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6
6
  * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
7
7
  */
8
8
 
9
9
  @import "bootstrap/functions";
10
10
  @import "bootstrap/variables";
11
+ // Prevent the usage of custom properties since we don't add them to `:root` in reboot
12
+ $font-family-base: $font-family-sans-serif; // stylelint-disable-line scss/dollar-variable-default
13
+ $font-family-code: $font-family-monospace; // stylelint-disable-line scss/dollar-variable-default
11
14
  @import "bootstrap/mixins";
12
15
  @import "bootstrap/reboot";
@@ -1,18 +1,23 @@
1
1
  /*!
2
- * Bootstrap v4.3.0 (https://getbootstrap.com/)
3
- * Copyright 2011-2019 The Bootstrap Authors
4
- * Copyright 2011-2019 Twitter, Inc.
5
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2
+ * Bootstrap v5.0.0-alpha1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2020 The Bootstrap Authors
4
+ * Copyright 2011-2020 Twitter, Inc.
5
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6
6
  */
7
7
 
8
+ // scss-docs-start import-stack
9
+ // Configuration
8
10
  @import "bootstrap/functions";
9
11
  @import "bootstrap/variables";
10
12
  @import "bootstrap/mixins";
13
+ @import "bootstrap/utilities";
14
+
15
+ // Layout & components
11
16
  @import "bootstrap/root";
12
17
  @import "bootstrap/reboot";
13
18
  @import "bootstrap/type";
14
19
  @import "bootstrap/images";
15
- @import "bootstrap/code";
20
+ @import "bootstrap/containers";
16
21
  @import "bootstrap/grid";
17
22
  @import "bootstrap/tables";
18
23
  @import "bootstrap/forms";
@@ -20,18 +25,14 @@
20
25
  @import "bootstrap/transitions";
21
26
  @import "bootstrap/dropdown";
22
27
  @import "bootstrap/button-group";
23
- @import "bootstrap/input-group";
24
- @import "bootstrap/custom-forms";
25
28
  @import "bootstrap/nav";
26
29
  @import "bootstrap/navbar";
27
30
  @import "bootstrap/card";
28
31
  @import "bootstrap/breadcrumb";
29
32
  @import "bootstrap/pagination";
30
33
  @import "bootstrap/badge";
31
- @import "bootstrap/jumbotron";
32
34
  @import "bootstrap/alert";
33
35
  @import "bootstrap/progress";
34
- @import "bootstrap/media";
35
36
  @import "bootstrap/list-group";
36
37
  @import "bootstrap/close";
37
38
  @import "bootstrap/toasts";
@@ -40,5 +41,10 @@
40
41
  @import "bootstrap/popover";
41
42
  @import "bootstrap/carousel";
42
43
  @import "bootstrap/spinners";
43
- @import "bootstrap/utilities";
44
- @import "bootstrap/print";
44
+
45
+ // Helpers
46
+ @import "bootstrap/helpers";
47
+
48
+ // Utilities
49
+ @import "bootstrap/utilities/api";
50
+ // scss-docs-end import-stack
@@ -40,12 +40,12 @@
40
40
  }
41
41
 
42
42
 
43
- // Alternate styles
44
- //
43
+ // scss-docs-start alert-modifiers
45
44
  // Generate contextual modifier classes for colorizing the alert.
46
45
 
47
46
  @each $color, $value in $theme-colors {
48
47
  .alert-#{$color} {
49
- @include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level));
48
+ @include alert-variant(color-level($value, $alert-bg-level), color-level($value, $alert-border-level), color-level($value, $alert-color-level));
50
49
  }
51
50
  }
51
+ // 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
- }
@@ -3,38 +3,27 @@
3
3
  flex-wrap: wrap;
4
4
  padding: $breadcrumb-padding-y $breadcrumb-padding-x;
5
5
  margin-bottom: $breadcrumb-margin-bottom;
6
+ @include font-size($breadcrumb-font-size);
6
7
  list-style: none;
7
8
  background-color: $breadcrumb-bg;
8
9
  @include border-radius($breadcrumb-border-radius);
9
10
  }
10
11
 
11
12
  .breadcrumb-item {
13
+ display: flex;
14
+
12
15
  // The separator between breadcrumbs (by default, a forward-slash: "/")
13
16
  + .breadcrumb-item {
14
- padding-left: $breadcrumb-item-padding;
17
+ padding-left: $breadcrumb-item-padding-x;
15
18
 
16
19
  &::before {
17
- display: inline-block; // Suppress underlining of the separator in modern browsers
18
- padding-right: $breadcrumb-item-padding;
20
+ display: inline-block; // Suppress underlining of the separator
21
+ padding-right: $breadcrumb-item-padding-x;
19
22
  color: $breadcrumb-divider-color;
20
- content: $breadcrumb-divider;
23
+ content: escape-svg($breadcrumb-divider);
21
24
  }
22
25
  }
23
26
 
24
- // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
25
- // without `<ul>`s. The `::before` pseudo-element generates an element
26
- // *within* the .breadcrumb-item and thereby inherits the `text-decoration`.
27
- //
28
- // To trick IE into suppressing the underline, we give the pseudo-element an
29
- // underline and then immediately remove it.
30
- + .breadcrumb-item:hover::before {
31
- text-decoration: underline;
32
- }
33
- // stylelint-disable-next-line no-duplicate-selectors
34
- + .breadcrumb-item:hover::before {
35
- text-decoration: none;
36
- }
37
-
38
27
  &.active {
39
28
  color: $breadcrumb-active-color;
40
29
  }
@@ -10,17 +10,17 @@
10
10
  > .btn {
11
11
  position: relative;
12
12
  flex: 1 1 auto;
13
+ }
13
14
 
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
- }
15
+ // Bring the hover, focused, and "active" buttons to the front to overlay
16
+ // the borders properly
17
+ > .btn-check:checked + .btn,
18
+ > .btn-check:focus + .btn,
19
+ > .btn:hover,
20
+ > .btn:focus,
21
+ > .btn:active,
22
+ > .btn.active {
23
+ z-index: 1;
24
24
  }
25
25
  }
26
26
 
@@ -48,7 +48,12 @@
48
48
  @include border-right-radius(0);
49
49
  }
50
50
 
51
- > .btn:not(:first-child),
51
+ // The left radius should be 0 if the button is:
52
+ // - the "third or more" child
53
+ // - the second child and the previous element isn't `.btn-check` (making it the first child visually)
54
+ // - part of a btn-group which isn't the first child
55
+ > .btn:nth-child(n + 3),
56
+ > :not(.btn-check) + .btn,
52
57
  > .btn-group:not(:first-child) > .btn {
53
58
  @include border-left-radius(0);
54
59
  }
@@ -134,30 +139,3 @@
134
139
  @include border-top-radius(0);
135
140
  }
136
141
  }
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,47 +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;
12
+ text-decoration: if($link-decoration == none, null, none);
13
+ white-space: $btn-white-space;
13
14
  vertical-align: middle;
15
+ cursor: if($enable-button-pointers, pointer, null);
14
16
  user-select: none;
15
17
  background-color: transparent;
16
18
  border: $btn-border-width solid transparent;
17
- @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);
18
20
  @include transition($btn-transition);
19
21
 
20
- @include hover {
22
+ &:hover {
21
23
  color: $body-color;
22
- text-decoration: none;
24
+ text-decoration: if($link-hover-decoration == underline, none, null);
23
25
  }
24
26
 
25
- &:focus,
26
- &.focus {
27
+ .btn-check:focus + &,
28
+ &:focus {
27
29
  outline: 0;
28
30
  box-shadow: $btn-focus-box-shadow;
29
31
  }
30
32
 
31
- // Disabled comes first so active can properly restyle
32
- &.disabled,
33
- &:disabled {
34
- opacity: $btn-disabled-opacity;
35
- @include box-shadow(none);
36
- }
37
-
38
- &:not(:disabled):not(.disabled):active,
39
- &:not(:disabled):not(.disabled).active {
33
+ .btn-check:checked + &,
34
+ .btn-check:active + &,
35
+ &:active,
36
+ &.active {
40
37
  @include box-shadow($btn-active-box-shadow);
41
38
 
42
39
  &:focus {
43
40
  @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
44
41
  }
45
42
  }
46
- }
47
43
 
48
- // Future-proof disabling of clicks on `<a>` elements
49
- a.btn.disabled,
50
- fieldset:disabled a.btn {
51
- 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
+ }
52
51
  }
53
52
 
54
53
 
@@ -76,24 +75,21 @@ fieldset:disabled a.btn {
76
75
  // Make a button look and behave like a link
77
76
  .btn-link {
78
77
  font-weight: $font-weight-normal;
79
- color: $link-color;
78
+ color: $btn-link-color;
80
79
  text-decoration: $link-decoration;
81
80
 
82
- @include hover {
83
- color: $link-hover-color;
81
+ &:hover {
82
+ color: $btn-link-hover-color;
84
83
  text-decoration: $link-hover-decoration;
85
84
  }
86
85
 
87
- &:focus,
88
- &.focus {
86
+ &:focus {
89
87
  text-decoration: $link-hover-decoration;
90
- box-shadow: none;
91
88
  }
92
89
 
93
90
  &:disabled,
94
91
  &.disabled {
95
92
  color: $btn-link-disabled-color;
96
- pointer-events: none;
97
93
  }
98
94
 
99
95
  // No need for an active state here
@@ -105,11 +101,11 @@ fieldset:disabled a.btn {
105
101
  //
106
102
 
107
103
  .btn-lg {
108
- @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
104
+ @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-border-radius-lg);
109
105
  }
110
106
 
111
107
  .btn-sm {
112
- @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
108
+ @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm);
113
109
  }
114
110
 
115
111
 
@@ -126,12 +122,3 @@ fieldset:disabled a.btn {
126
122
  margin-top: $btn-block-spacing-y;
127
123
  }
128
124
  }
129
-
130
- // Specificity overrides
131
- input[type="submit"],
132
- input[type="reset"],
133
- input[type="button"] {
134
- &.btn-block {
135
- width: 100%;
136
- }
137
- }