bootstrap 4.6.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 (132) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap-sprockets.js +12 -8
  4. data/assets/javascripts/bootstrap.js +1889 -1255
  5. data/assets/javascripts/bootstrap.min.js +3 -3
  6. data/assets/javascripts/bootstrap/alert.js +136 -66
  7. data/assets/javascripts/bootstrap/button.js +59 -147
  8. data/assets/javascripts/bootstrap/carousel.js +276 -180
  9. data/assets/javascripts/bootstrap/collapse.js +284 -136
  10. data/assets/javascripts/bootstrap/dom/data.js +81 -0
  11. data/assets/javascripts/bootstrap/dom/event-handler.js +311 -0
  12. data/assets/javascripts/bootstrap/dom/manipulator.js +100 -0
  13. data/assets/javascripts/bootstrap/dom/polyfill.js +110 -0
  14. data/assets/javascripts/bootstrap/dom/selector-engine.js +98 -0
  15. data/assets/javascripts/bootstrap/dropdown.js +238 -195
  16. data/assets/javascripts/bootstrap/modal.js +321 -223
  17. data/assets/javascripts/bootstrap/popover.js +75 -79
  18. data/assets/javascripts/bootstrap/scrollspy.js +150 -86
  19. data/assets/javascripts/bootstrap/tab.js +154 -82
  20. data/assets/javascripts/bootstrap/toast.js +162 -95
  21. data/assets/javascripts/bootstrap/tooltip.js +337 -191
  22. data/assets/stylesheets/_bootstrap-grid.scss +53 -18
  23. data/assets/stylesheets/_bootstrap-reboot.scss +6 -3
  24. data/assets/stylesheets/_bootstrap.scss +16 -10
  25. data/assets/stylesheets/bootstrap/_alert.scss +3 -4
  26. data/assets/stylesheets/bootstrap/_badge.scss +2 -27
  27. data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -17
  28. data/assets/stylesheets/bootstrap/_button-group.scss +16 -38
  29. data/assets/stylesheets/bootstrap/_buttons.scss +27 -45
  30. data/assets/stylesheets/bootstrap/_card.scss +22 -68
  31. data/assets/stylesheets/bootstrap/_carousel.scss +13 -15
  32. data/assets/stylesheets/bootstrap/_close.scss +9 -13
  33. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  34. data/assets/stylesheets/bootstrap/_dropdown.scss +12 -9
  35. data/assets/stylesheets/bootstrap/_forms.scss +9 -347
  36. data/assets/stylesheets/bootstrap/_functions.scss +82 -23
  37. data/assets/stylesheets/bootstrap/_grid.scss +3 -54
  38. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  39. data/assets/stylesheets/bootstrap/_list-group.scss +7 -4
  40. data/assets/stylesheets/bootstrap/_mixins.scss +6 -12
  41. data/assets/stylesheets/bootstrap/_modal.scss +34 -39
  42. data/assets/stylesheets/bootstrap/_nav.scss +7 -4
  43. data/assets/stylesheets/bootstrap/_navbar.scss +42 -82
  44. data/assets/stylesheets/bootstrap/_pagination.scss +7 -20
  45. data/assets/stylesheets/bootstrap/_popover.scss +5 -5
  46. data/assets/stylesheets/bootstrap/_progress.scss +3 -5
  47. data/assets/stylesheets/bootstrap/_reboot.scss +304 -172
  48. data/assets/stylesheets/bootstrap/_root.scss +5 -8
  49. data/assets/stylesheets/bootstrap/_spinners.scss +4 -13
  50. data/assets/stylesheets/bootstrap/_tables.scss +80 -114
  51. data/assets/stylesheets/bootstrap/_toasts.scss +2 -4
  52. data/assets/stylesheets/bootstrap/_tooltip.scss +5 -5
  53. data/assets/stylesheets/bootstrap/_transitions.scss +0 -1
  54. data/assets/stylesheets/bootstrap/_type.scss +38 -59
  55. data/assets/stylesheets/bootstrap/_utilities.scss +503 -18
  56. data/assets/stylesheets/bootstrap/_variables.scss +546 -432
  57. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  58. data/assets/stylesheets/bootstrap/forms/_form-check.scss +142 -0
  59. data/assets/stylesheets/bootstrap/forms/_form-control.scss +116 -0
  60. data/assets/stylesheets/bootstrap/forms/_form-file.scss +91 -0
  61. data/assets/stylesheets/bootstrap/forms/_form-range.scss +136 -0
  62. data/assets/stylesheets/bootstrap/forms/_form-select.scss +82 -0
  63. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  64. data/assets/stylesheets/bootstrap/forms/_input-group.scss +140 -0
  65. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  66. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  67. data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
  68. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  69. data/assets/stylesheets/bootstrap/helpers/_embed.scss +31 -0
  70. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  71. data/assets/stylesheets/bootstrap/helpers/_screenreaders.scss +8 -0
  72. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  73. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  74. data/assets/stylesheets/bootstrap/mixins/_alert.scss +0 -4
  75. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +1 -1
  76. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +11 -8
  77. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +62 -47
  78. data/assets/stylesheets/bootstrap/mixins/_caret.scss +4 -4
  79. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  80. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  81. data/assets/stylesheets/bootstrap/mixins/_forms.scss +22 -74
  82. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +9 -11
  83. data/assets/stylesheets/bootstrap/mixins/_grid.scss +85 -33
  84. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
  85. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -1
  86. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  87. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +15 -8
  88. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
  89. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +17 -23
  90. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  91. data/assets/stylesheets/bootstrap/mixins/_transition.scss +2 -2
  92. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +49 -0
  93. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  94. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +234 -126
  95. data/lib/bootstrap/version.rb +2 -2
  96. data/tasks/updater/js.rb +3 -3
  97. metadata +32 -40
  98. data/assets/javascripts/bootstrap/util.js +0 -192
  99. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  100. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -526
  101. data/assets/stylesheets/bootstrap/_input-group.scss +0 -208
  102. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
  103. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  104. data/assets/stylesheets/bootstrap/_print.scss +0 -141
  105. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
  106. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
  107. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
  108. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -80
  109. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  110. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
  111. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
  112. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
  113. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
  114. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
  115. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
  116. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  117. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  118. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
  119. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
  120. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
  121. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  122. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
  123. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +0 -5
  124. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
  125. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
  126. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  127. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  128. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
  129. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
  130. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
  131. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
  132. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
@@ -1,30 +1,65 @@
1
1
  /*!
2
- * Bootstrap Grid v4.6.0 (https://getbootstrap.com/)
3
- * Copyright 2011-2021 The Bootstrap Authors
4
- * Copyright 2011-2021 Twitter, Inc.
2
+ * Bootstrap Grid v5.0.0-alpha1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2020 The Bootstrap Authors
4
+ * Copyright 2011-2020 Twitter, Inc.
5
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
 
22
- @import "bootstrap/mixins/deprecate";
13
+ @import "bootstrap/mixins/lists";
23
14
  @import "bootstrap/mixins/breakpoints";
24
- @import "bootstrap/mixins/grid-framework";
15
+ @import "bootstrap/mixins/container";
25
16
  @import "bootstrap/mixins/grid";
17
+ @import "bootstrap/mixins/utilities";
18
+
19
+ @import "bootstrap/vendor/rfs";
26
20
 
21
+ @import "bootstrap/containers";
27
22
  @import "bootstrap/grid";
28
- @import "bootstrap/utilities/display";
29
- @import "bootstrap/utilities/flex";
30
- @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.6.0 (https://getbootstrap.com/)
3
- * Copyright 2011-2021 The Bootstrap Authors
4
- * Copyright 2011-2021 Twitter, Inc.
2
+ * Bootstrap Reboot v5.0.0-alpha1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2020 The Bootstrap Authors
4
+ * Copyright 2011-2020 Twitter, Inc.
5
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.6.0 (https://getbootstrap.com/)
3
- * Copyright 2011-2021 The Bootstrap Authors
4
- * Copyright 2011-2021 Twitter, Inc.
2
+ * Bootstrap v5.0.0-alpha1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2020 The Bootstrap Authors
4
+ * Copyright 2011-2020 Twitter, Inc.
5
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
@@ -34,19 +34,18 @@
34
34
  position: absolute;
35
35
  top: 0;
36
36
  right: 0;
37
- z-index: 2;
38
37
  padding: $alert-padding-y $alert-padding-x;
39
38
  color: inherit;
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
46
  @each $color, $value in $theme-colors {
49
47
  .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));
48
+ @include alert-variant(color-level($value, $alert-bg-level), color-level($value, $alert-border-level), color-level($value, $alert-color-level));
51
49
  }
52
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
- }
@@ -10,32 +10,20 @@
10
10
  }
11
11
 
12
12
  .breadcrumb-item {
13
+ display: flex;
14
+
13
15
  // The separator between breadcrumbs (by default, a forward-slash: "/")
14
16
  + .breadcrumb-item {
15
- padding-left: $breadcrumb-item-padding;
17
+ padding-left: $breadcrumb-item-padding-x;
16
18
 
17
19
  &::before {
18
- float: left; // Suppress inline spacings and underlining of the separator
19
- padding-right: $breadcrumb-item-padding;
20
+ display: inline-block; // Suppress underlining of the separator
21
+ padding-right: $breadcrumb-item-padding-x;
20
22
  color: $breadcrumb-divider-color;
21
23
  content: escape-svg($breadcrumb-divider);
22
24
  }
23
25
  }
24
26
 
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
27
  &.active {
40
28
  color: $breadcrumb-active-color;
41
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,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
- }
33
+ .btn-check:checked + &,
34
+ .btn-check:active + &,
35
+ &:active,
36
+ &.active {
37
+ @include box-shadow($btn-active-box-shadow);
39
38
 
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);
46
-
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
 
@@ -82,23 +75,21 @@ fieldset:disabled a.btn {
82
75
  // Make a button look and behave like a link
83
76
  .btn-link {
84
77
  font-weight: $font-weight-normal;
85
- color: $link-color;
78
+ color: $btn-link-color;
86
79
  text-decoration: $link-decoration;
87
80
 
88
- @include hover() {
89
- color: $link-hover-color;
81
+ &:hover {
82
+ color: $btn-link-hover-color;
90
83
  text-decoration: $link-hover-decoration;
91
84
  }
92
85
 
93
- &:focus,
94
- &.focus {
86
+ &:focus {
95
87
  text-decoration: $link-hover-decoration;
96
88
  }
97
89
 
98
90
  &:disabled,
99
91
  &.disabled {
100
92
  color: $btn-link-disabled-color;
101
- pointer-events: none;
102
93
  }
103
94
 
104
95
  // No need for an active state here
@@ -110,11 +101,11 @@ fieldset:disabled a.btn {
110
101
  //
111
102
 
112
103
  .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);
104
+ @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-border-radius-lg);
114
105
  }
115
106
 
116
107
  .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);
108
+ @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm);
118
109
  }
119
110
 
120
111
 
@@ -131,12 +122,3 @@ fieldset:disabled a.btn {
131
122
  margin-top: $btn-block-spacing-y;
132
123
  }
133
124
  }
134
-
135
- // Specificity overrides
136
- input[type="submit"],
137
- input[type="reset"],
138
- input[type="button"] {
139
- &.btn-block {
140
- width: 100%;
141
- }
142
- }