bootstrap 4.5.2 → 5.0.0.beta1

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 (135) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/README.md +5 -2
  4. data/assets/javascripts/bootstrap-sprockets.js +11 -8
  5. data/assets/javascripts/bootstrap.js +2170 -1572
  6. data/assets/javascripts/bootstrap.min.js +2 -2
  7. data/assets/javascripts/bootstrap/alert.js +195 -66
  8. data/assets/javascripts/bootstrap/button.js +120 -136
  9. data/assets/javascripts/bootstrap/carousel.js +390 -184
  10. data/assets/javascripts/bootstrap/collapse.js +364 -133
  11. data/assets/javascripts/bootstrap/dom/data.js +81 -0
  12. data/assets/javascripts/bootstrap/dom/event-handler.js +309 -0
  13. data/assets/javascripts/bootstrap/dom/manipulator.js +86 -0
  14. data/assets/javascripts/bootstrap/dom/selector-engine.js +98 -0
  15. data/assets/javascripts/bootstrap/dropdown.js +357 -232
  16. data/assets/javascripts/bootstrap/modal.js +406 -211
  17. data/assets/javascripts/bootstrap/popover.js +82 -50
  18. data/assets/javascripts/bootstrap/scrollspy.js +226 -80
  19. data/assets/javascripts/bootstrap/tab.js +215 -77
  20. data/assets/javascripts/bootstrap/toast.js +239 -79
  21. data/assets/javascripts/bootstrap/tooltip.js +529 -258
  22. data/assets/stylesheets/_bootstrap-grid.scss +51 -15
  23. data/assets/stylesheets/_bootstrap-reboot.scss +4 -1
  24. data/assets/stylesheets/_bootstrap.scss +15 -8
  25. data/assets/stylesheets/bootstrap/_accordion.scss +125 -0
  26. data/assets/stylesheets/bootstrap/_alert.scss +15 -9
  27. data/assets/stylesheets/bootstrap/_badge.scss +2 -27
  28. data/assets/stylesheets/bootstrap/_breadcrumb.scss +4 -20
  29. data/assets/stylesheets/bootstrap/_button-group.scss +21 -45
  30. data/assets/stylesheets/bootstrap/_buttons.scss +27 -60
  31. data/assets/stylesheets/bootstrap/_card.scss +25 -96
  32. data/assets/stylesheets/bootstrap/_carousel.scss +54 -28
  33. data/assets/stylesheets/bootstrap/_close.scss +30 -30
  34. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  35. data/assets/stylesheets/bootstrap/_dropdown.scss +74 -31
  36. data/assets/stylesheets/bootstrap/_forms.scss +9 -347
  37. data/assets/stylesheets/bootstrap/_functions.scss +87 -23
  38. data/assets/stylesheets/bootstrap/_grid.scss +3 -54
  39. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  40. data/assets/stylesheets/bootstrap/_list-group.scss +18 -9
  41. data/assets/stylesheets/bootstrap/_mixins.scss +7 -13
  42. data/assets/stylesheets/bootstrap/_modal.scss +41 -46
  43. data/assets/stylesheets/bootstrap/_nav.scss +12 -8
  44. data/assets/stylesheets/bootstrap/_navbar.scss +43 -74
  45. data/assets/stylesheets/bootstrap/_pagination.scss +10 -20
  46. data/assets/stylesheets/bootstrap/_popover.scss +23 -20
  47. data/assets/stylesheets/bootstrap/_progress.scss +3 -5
  48. data/assets/stylesheets/bootstrap/_reboot.scss +328 -173
  49. data/assets/stylesheets/bootstrap/_root.scss +5 -9
  50. data/assets/stylesheets/bootstrap/_spinners.scss +14 -5
  51. data/assets/stylesheets/bootstrap/_tables.scss +79 -114
  52. data/assets/stylesheets/bootstrap/_toasts.scss +19 -15
  53. data/assets/stylesheets/bootstrap/_tooltip.scss +17 -17
  54. data/assets/stylesheets/bootstrap/_transitions.scss +0 -1
  55. data/assets/stylesheets/bootstrap/_type.scss +38 -59
  56. data/assets/stylesheets/bootstrap/_utilities.scss +560 -18
  57. data/assets/stylesheets/bootstrap/_variables.scss +652 -459
  58. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  59. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +61 -0
  60. data/assets/stylesheets/bootstrap/forms/_form-check.scss +151 -0
  61. data/assets/stylesheets/bootstrap/forms/_form-control.scss +223 -0
  62. data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
  63. data/assets/stylesheets/bootstrap/forms/_form-select.scss +68 -0
  64. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  65. data/assets/stylesheets/bootstrap/forms/_input-group.scss +121 -0
  66. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  67. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  68. data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
  69. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  70. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  71. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -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/helpers/_visually-hidden.scss +8 -0
  75. data/assets/stylesheets/bootstrap/mixins/_alert.scss +1 -5
  76. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +9 -9
  77. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
  78. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +14 -10
  79. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +65 -47
  80. data/assets/stylesheets/bootstrap/mixins/_caret.scss +8 -8
  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 +17 -78
  84. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +9 -11
  85. data/assets/stylesheets/bootstrap/mixins/_grid.scss +84 -33
  86. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
  87. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +3 -2
  88. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  89. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +15 -8
  90. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
  91. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  92. data/assets/stylesheets/bootstrap/mixins/_transition.scss +2 -2
  93. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +68 -0
  94. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +28 -0
  95. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  96. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +234 -126
  97. data/lib/bootstrap/version.rb +2 -2
  98. data/tasks/updater/js.rb +6 -4
  99. metadata +33 -41
  100. data/assets/javascripts/bootstrap/util.js +0 -192
  101. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  102. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -523
  103. data/assets/stylesheets/bootstrap/_input-group.scss +0 -192
  104. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
  105. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  106. data/assets/stylesheets/bootstrap/_print.scss +0 -141
  107. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
  108. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
  109. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
  110. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -80
  111. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  112. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
  113. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -34
  114. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
  115. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
  116. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
  117. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
  118. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
  119. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  120. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  121. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
  122. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
  123. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
  124. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  125. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
  126. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +0 -5
  127. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
  128. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
  129. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  130. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  131. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
  132. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
  133. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
  134. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
  135. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
@@ -3,11 +3,7 @@
3
3
  @include gradient-bg($background);
4
4
  border-color: $border;
5
5
 
6
- hr {
7
- border-top-color: darken($border, 5%);
8
- }
9
-
10
6
  .alert-link {
11
- color: darken($color, 10%);
7
+ color: shade-color($color, 20%);
12
8
  }
13
9
  }
@@ -1,4 +1,4 @@
1
- // stylelint-disable property-blacklist
1
+ // stylelint-disable property-disallowed-list
2
2
  // Single side border-radius
3
3
 
4
4
  // Helper function to replace negative values with 0
@@ -23,53 +23,53 @@
23
23
  }
24
24
  }
25
25
 
26
- @mixin border-top-radius($radius) {
26
+ @mixin border-top-radius($radius: $border-radius) {
27
27
  @if $enable-rounded {
28
28
  border-top-left-radius: valid-radius($radius);
29
29
  border-top-right-radius: valid-radius($radius);
30
30
  }
31
31
  }
32
32
 
33
- @mixin border-right-radius($radius) {
33
+ @mixin border-end-radius($radius: $border-radius) {
34
34
  @if $enable-rounded {
35
35
  border-top-right-radius: valid-radius($radius);
36
36
  border-bottom-right-radius: valid-radius($radius);
37
37
  }
38
38
  }
39
39
 
40
- @mixin border-bottom-radius($radius) {
40
+ @mixin border-bottom-radius($radius: $border-radius) {
41
41
  @if $enable-rounded {
42
42
  border-bottom-right-radius: valid-radius($radius);
43
43
  border-bottom-left-radius: valid-radius($radius);
44
44
  }
45
45
  }
46
46
 
47
- @mixin border-left-radius($radius) {
47
+ @mixin border-start-radius($radius: $border-radius) {
48
48
  @if $enable-rounded {
49
49
  border-top-left-radius: valid-radius($radius);
50
50
  border-bottom-left-radius: valid-radius($radius);
51
51
  }
52
52
  }
53
53
 
54
- @mixin border-top-left-radius($radius) {
54
+ @mixin border-top-start-radius($radius: $border-radius) {
55
55
  @if $enable-rounded {
56
56
  border-top-left-radius: valid-radius($radius);
57
57
  }
58
58
  }
59
59
 
60
- @mixin border-top-right-radius($radius) {
60
+ @mixin border-top-end-radius($radius: $border-radius) {
61
61
  @if $enable-rounded {
62
62
  border-top-right-radius: valid-radius($radius);
63
63
  }
64
64
  }
65
65
 
66
- @mixin border-bottom-right-radius($radius) {
66
+ @mixin border-bottom-end-radius($radius: $border-radius) {
67
67
  @if $enable-rounded {
68
68
  border-bottom-right-radius: valid-radius($radius);
69
69
  }
70
70
  }
71
71
 
72
- @mixin border-bottom-left-radius($radius) {
72
+ @mixin border-bottom-start-radius($radius: $border-radius) {
73
73
  @if $enable-rounded {
74
74
  border-bottom-left-radius: valid-radius($radius);
75
75
  }
@@ -2,17 +2,15 @@
2
2
  @if $enable-shadows {
3
3
  $result: ();
4
4
 
5
- @if (length($shadow) == 1) {
6
- // We can pass `@include box-shadow(none);`
7
- $result: $shadow;
8
- } @else {
9
- // Filter to avoid invalid properties for example `box-shadow: none, 1px 1px black;`
10
- @for $i from 1 through length($shadow) {
11
- @if nth($shadow, $i) != "none" {
12
- $result: append($result, nth($shadow, $i), "comma");
13
- }
5
+ @each $value in $shadow {
6
+ @if $value != null {
7
+ $result: append($result, $value, "comma");
8
+ }
9
+ @if $value == none and length($shadow) > 1 {
10
+ @warn "The keyword 'none' must be used as a single argument.";
14
11
  }
15
12
  }
13
+
16
14
  @if (length($result) > 0) {
17
15
  box-shadow: $result;
18
16
  }
@@ -16,7 +16,10 @@
16
16
  // md
17
17
  @function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
18
18
  $n: index($breakpoint-names, $name);
19
- @return if($n != null and $n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
19
+ @if not $n {
20
+ @error "breakpoint `#{$name}` not found in `#{$breakpoints}`";
21
+ }
22
+ @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
20
23
  }
21
24
 
22
25
  // Minimum breakpoint width. Null for the smallest (first) breakpoint.
@@ -28,18 +31,18 @@
28
31
  @return if($min != 0, $min, null);
29
32
  }
30
33
 
31
- // Maximum breakpoint width. Null for the largest (last) breakpoint.
32
- // The maximum value is calculated as the minimum of the next one less 0.02px
33
- // to work around the limitations of `min-` and `max-` prefixes and viewports with fractional widths.
34
+ // Maximum breakpoint width.
35
+ // The maximum value is reduced by 0.02px to work around the limitations of
36
+ // `min-` and `max-` prefixes and viewports with fractional widths.
34
37
  // See https://www.w3.org/TR/mediaqueries-4/#mq-min-max
35
38
  // Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.
36
39
  // See https://bugs.webkit.org/show_bug.cgi?id=178261
37
40
  //
38
- // >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
41
+ // >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
39
42
  // 767.98px
40
43
  @function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
41
- $next: breakpoint-next($name, $breakpoints);
42
- @return if($next, breakpoint-min($next, $breakpoints) - .02, null);
44
+ $max: map-get($breakpoints, $name);
45
+ @return if($max and $max > 0, $max - .02, null);
43
46
  }
44
47
 
45
48
  // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
@@ -104,8 +107,9 @@
104
107
  // No minimum for the smallest breakpoint, and no maximum for the largest one.
105
108
  // Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
106
109
  @mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
107
- $min: breakpoint-min($name, $breakpoints);
108
- $max: breakpoint-max($name, $breakpoints);
110
+ $min: breakpoint-min($name, $breakpoints);
111
+ $next: breakpoint-next($name, $breakpoints);
112
+ $max: breakpoint-max($next);
109
113
 
110
114
  @if $min != null and $max != null {
111
115
  @media (min-width: $min) and (max-width: $max) {
@@ -116,7 +120,7 @@
116
120
  @content;
117
121
  }
118
122
  } @else if $min == null {
119
- @include media-breakpoint-down($name, $breakpoints) {
123
+ @include media-breakpoint-down($next, $breakpoints) {
120
124
  @content;
121
125
  }
122
126
  }
@@ -3,94 +3,107 @@
3
3
  // Easily pump out default styles, as well as :hover, :focus, :active,
4
4
  // and disabled options for all buttons
5
5
 
6
- @mixin button-variant($background, $border, $hover-background: darken($background, 7.5%), $hover-border: darken($border, 10%), $active-background: darken($background, 10%), $active-border: darken($border, 12.5%)) {
7
- color: color-yiq($background);
6
+ @mixin button-variant(
7
+ $background,
8
+ $border,
9
+ $color: color-contrast($background),
10
+ $hover-background: if($color == $color-contrast-light, shade-color($background, 15%), tint-color($background, 15%)),
11
+ $hover-border: if($color == $color-contrast-light, shade-color($border, 20%), tint-color($border, 10%)),
12
+ $hover-color: color-contrast($hover-background),
13
+ $active-background: if($color == $color-contrast-light, shade-color($background, 20%), tint-color($background, 20%)),
14
+ $active-border: if($color == $color-contrast-light, shade-color($border, 25%), tint-color($border, 10%)),
15
+ $active-color: color-contrast($active-background),
16
+ $disabled-background: $background,
17
+ $disabled-border: $border,
18
+ $disabled-color: color-contrast($disabled-background)
19
+ ) {
20
+ color: $color;
8
21
  @include gradient-bg($background);
9
22
  border-color: $border;
10
23
  @include box-shadow($btn-box-shadow);
11
24
 
12
- @include hover() {
13
- color: color-yiq($hover-background);
25
+ &:hover {
26
+ color: $hover-color;
14
27
  @include gradient-bg($hover-background);
15
28
  border-color: $hover-border;
16
29
  }
17
30
 
18
- &:focus,
19
- &.focus {
20
- color: color-yiq($hover-background);
31
+ .btn-check:focus + &,
32
+ &:focus {
33
+ color: $hover-color;
21
34
  @include gradient-bg($hover-background);
22
35
  border-color: $hover-border;
23
36
  @if $enable-shadows {
24
- @include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
37
+ @include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
25
38
  } @else {
26
39
  // Avoid using mixin so we can pass custom focus shadow properly
27
- box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
28
- }
29
- }
30
-
31
- // Disabled comes first so active can properly restyle
32
- &.disabled,
33
- &:disabled {
34
- color: color-yiq($background);
35
- background-color: $background;
36
- border-color: $border;
37
- // Remove CSS gradients if they're enabled
38
- @if $enable-gradients {
39
- background-image: none;
40
+ box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
40
41
  }
41
42
  }
42
43
 
43
- &:not(:disabled):not(.disabled):active,
44
- &:not(:disabled):not(.disabled).active,
44
+ .btn-check:checked + &,
45
+ .btn-check:active + &,
46
+ &:active,
47
+ &.active,
45
48
  .show > &.dropdown-toggle {
46
- color: color-yiq($active-background);
49
+ color: $active-color;
47
50
  background-color: $active-background;
48
- @if $enable-gradients {
49
- background-image: none; // Remove the gradient for the pressed/active state
50
- }
51
+ // Remove CSS gradients if they're enabled
52
+ background-image: if($enable-gradients, none, null);
51
53
  border-color: $active-border;
52
54
 
53
55
  &:focus {
54
- @if $enable-shadows and $btn-active-box-shadow != none {
55
- @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
56
+ @if $enable-shadows {
57
+ @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
56
58
  } @else {
57
59
  // Avoid using mixin so we can pass custom focus shadow properly
58
- box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
60
+ box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
59
61
  }
60
62
  }
61
63
  }
64
+
65
+ &:disabled,
66
+ &.disabled {
67
+ color: $disabled-color;
68
+ background-color: $disabled-background;
69
+ // Remove CSS gradients if they're enabled
70
+ background-image: if($enable-gradients, none, null);
71
+ border-color: $disabled-border;
72
+ }
62
73
  }
63
74
 
64
- @mixin button-outline-variant($color, $color-hover: color-yiq($color), $active-background: $color, $active-border: $color) {
75
+ @mixin button-outline-variant(
76
+ $color,
77
+ $color-hover: color-contrast($color),
78
+ $active-background: $color,
79
+ $active-border: $color,
80
+ $active-color: color-contrast($active-background)
81
+ ) {
65
82
  color: $color;
66
83
  border-color: $color;
67
84
 
68
- @include hover() {
85
+ &:hover {
69
86
  color: $color-hover;
70
87
  background-color: $active-background;
71
88
  border-color: $active-border;
72
89
  }
73
90
 
74
- &:focus,
75
- &.focus {
91
+ .btn-check:focus + &,
92
+ &:focus {
76
93
  box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
77
94
  }
78
95
 
79
- &.disabled,
80
- &:disabled {
81
- color: $color;
82
- background-color: transparent;
83
- }
84
-
85
- &:not(:disabled):not(.disabled):active,
86
- &:not(:disabled):not(.disabled).active,
87
- .show > &.dropdown-toggle {
88
- color: color-yiq($active-background);
96
+ .btn-check:checked + &,
97
+ .btn-check:active + &,
98
+ &:active,
99
+ &.active,
100
+ &.dropdown-toggle.show {
101
+ color: $active-color;
89
102
  background-color: $active-background;
90
103
  border-color: $active-border;
91
104
 
92
105
  &:focus {
93
- @if $enable-shadows and $btn-active-box-shadow != none {
106
+ @if $enable-shadows {
94
107
  @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5));
95
108
  } @else {
96
109
  // Avoid using mixin so we can pass custom focus shadow properly
@@ -98,13 +111,18 @@
98
111
  }
99
112
  }
100
113
  }
114
+
115
+ &:disabled,
116
+ &.disabled {
117
+ color: $color;
118
+ background-color: transparent;
119
+ }
101
120
  }
102
121
 
103
122
  // Button sizes
104
- @mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
123
+ @mixin button-size($padding-y, $padding-x, $font-size, $border-radius) {
105
124
  padding: $padding-y $padding-x;
106
125
  @include font-size($font-size);
107
- line-height: $line-height;
108
126
  // Manually declare to provide an override to the browser default
109
127
  @include border-radius($border-radius, 0);
110
128
  }
@@ -1,25 +1,25 @@
1
- @mixin caret-down() {
1
+ @mixin caret-down {
2
2
  border-top: $caret-width solid;
3
3
  border-right: $caret-width solid transparent;
4
4
  border-bottom: 0;
5
5
  border-left: $caret-width solid transparent;
6
6
  }
7
7
 
8
- @mixin caret-up() {
8
+ @mixin caret-up {
9
9
  border-top: 0;
10
10
  border-right: $caret-width solid transparent;
11
11
  border-bottom: $caret-width solid;
12
12
  border-left: $caret-width solid transparent;
13
13
  }
14
14
 
15
- @mixin caret-right() {
15
+ @mixin caret-end {
16
16
  border-top: $caret-width solid transparent;
17
17
  border-right: 0;
18
18
  border-bottom: $caret-width solid transparent;
19
19
  border-left: $caret-width solid;
20
20
  }
21
21
 
22
- @mixin caret-left() {
22
+ @mixin caret-start {
23
23
  border-top: $caret-width solid transparent;
24
24
  border-right: $caret-width solid;
25
25
  border-bottom: $caret-width solid transparent;
@@ -36,12 +36,12 @@
36
36
  @include caret-down();
37
37
  } @else if $direction == up {
38
38
  @include caret-up();
39
- } @else if $direction == right {
40
- @include caret-right();
39
+ } @else if $direction == end {
40
+ @include caret-end();
41
41
  }
42
42
  }
43
43
 
44
- @if $direction == left {
44
+ @if $direction == start {
45
45
  &::after {
46
46
  display: none;
47
47
  }
@@ -51,7 +51,7 @@
51
51
  margin-right: $caret-spacing;
52
52
  vertical-align: $caret-vertical-align;
53
53
  content: "";
54
- @include caret-left();
54
+ @include caret-start();
55
55
  }
56
56
  }
57
57
 
@@ -1,3 +1,4 @@
1
+ // scss-docs-start clearfix
1
2
  @mixin clearfix() {
2
3
  &::after {
3
4
  display: block;
@@ -5,3 +6,4 @@
5
6
  content: "";
6
7
  }
7
8
  }
9
+ // scss-docs-end clearfix
@@ -0,0 +1,9 @@
1
+ // Container mixins
2
+
3
+ @mixin make-container($gutter: $container-padding-x) {
4
+ width: 100%;
5
+ padding-right: var(--#{$variable-prefix}gutter-x, #{$gutter});
6
+ padding-left: var(--#{$variable-prefix}gutter-x, #{$gutter});
7
+ margin-right: auto;
8
+ margin-left: auto;
9
+ }
@@ -1,31 +1,3 @@
1
- // Form control focus state
2
- //
3
- // Generate a customized focus state and for any input with the specified color,
4
- // which defaults to the `$input-focus-border-color` variable.
5
- //
6
- // We highly encourage you to not customize the default value, but instead use
7
- // this to tweak colors on an as-needed basis. This aesthetic change is based on
8
- // WebKit's default styles, but applicable to a wider range of browsers. Its
9
- // usability and accessibility should be taken into account with any change.
10
- //
11
- // Example usage: change the default blue border and shadow to white for better
12
- // contrast against a dark gray background.
13
- @mixin form-control-focus($ignore-warning: false) {
14
- &:focus {
15
- color: $input-focus-color;
16
- background-color: $input-focus-bg;
17
- border-color: $input-focus-border-color;
18
- outline: 0;
19
- @if $enable-shadows {
20
- @include box-shadow($input-box-shadow, $input-focus-box-shadow);
21
- } @else {
22
- // Avoid using mixin so we can pass custom focus shadow properly
23
- box-shadow: $input-focus-box-shadow;
24
- }
25
- }
26
- @include deprecate("The `form-control-focus()` mixin", "v4.4.0", "v5", $ignore-warning);
27
- }
28
-
29
1
  // This mixin uses an `if()` technique to be compatible with Dart Sass
30
2
  // See https://github.com/sass/sass/issues/1873#issuecomment-152293725 for more details
31
3
  @mixin form-validation-state-selector($state) {
@@ -47,13 +19,13 @@
47
19
  width: 100%;
48
20
  margin-top: $form-feedback-margin-top;
49
21
  @include font-size($form-feedback-font-size);
22
+ font-style: $form-feedback-font-style;
50
23
  color: $color;
51
24
  }
52
25
 
53
26
  .#{$state}-tooltip {
54
27
  position: absolute;
55
28
  top: 100%;
56
- left: 0;
57
29
  z-index: 5;
58
30
  display: none;
59
31
  max-width: 100%; // Contain to parent when possible
@@ -61,7 +33,7 @@
61
33
  margin-top: .1rem;
62
34
  @include font-size($form-feedback-tooltip-font-size);
63
35
  line-height: $form-feedback-tooltip-line-height;
64
- color: color-yiq($color);
36
+ color: color-contrast($color);
65
37
  background-color: rgba($color, $form-feedback-tooltip-opacity);
66
38
  @include border-radius($form-feedback-tooltip-border-radius);
67
39
  }
@@ -87,7 +59,7 @@
87
59
 
88
60
  &:focus {
89
61
  border-color: $color;
90
- box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
62
+ box-shadow: 0 0 0 $input-focus-width rgba($color, $input-btn-focus-color-opacity);
91
63
  }
92
64
  }
93
65
  }
@@ -102,13 +74,15 @@
102
74
  }
103
75
  }
104
76
 
105
- .custom-select {
77
+ .form-select {
106
78
  @include form-validation-state-selector($state) {
107
79
  border-color: $color;
108
80
 
109
81
  @if $enable-validation-icons {
110
- padding-right: $custom-select-feedback-icon-padding-right;
111
- background: $custom-select-background, escape-svg($icon) $custom-select-bg no-repeat $custom-select-feedback-icon-position / $custom-select-feedback-icon-size;
82
+ padding-right: $form-select-feedback-icon-padding-end;
83
+ background-image: escape-svg($form-select-indicator), escape-svg($icon);
84
+ background-position: $form-select-bg-position, $form-select-feedback-icon-position;
85
+ background-size: $form-select-bg-size, $form-select-feedback-icon-size;
112
86
  }
113
87
 
114
88
  &:focus {
@@ -120,59 +94,24 @@
120
94
 
121
95
  .form-check-input {
122
96
  @include form-validation-state-selector($state) {
123
- ~ .form-check-label {
124
- color: $color;
125
- }
126
-
127
- ~ .#{$state}-feedback,
128
- ~ .#{$state}-tooltip {
129
- display: block;
130
- }
131
- }
132
- }
133
-
134
- .custom-control-input {
135
- @include form-validation-state-selector($state) {
136
- ~ .custom-control-label {
137
- color: $color;
138
-
139
- &::before {
140
- border-color: $color;
141
- }
142
- }
97
+ border-color: $color;
143
98
 
144
99
  &:checked {
145
- ~ .custom-control-label::before {
146
- border-color: lighten($color, 10%);
147
- @include gradient-bg(lighten($color, 10%));
148
- }
100
+ background-color: $color;
149
101
  }
150
102
 
151
103
  &:focus {
152
- ~ .custom-control-label::before {
153
- box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
154
- }
104
+ box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
105
+ }
155
106
 
156
- &:not(:checked) ~ .custom-control-label::before {
157
- border-color: $color;
158
- }
107
+ ~ .form-check-label {
108
+ color: $color;
159
109
  }
160
110
  }
161
111
  }
162
-
163
- // custom file
164
- .custom-file-input {
165
- @include form-validation-state-selector($state) {
166
- ~ .custom-file-label {
167
- border-color: $color;
168
- }
169
-
170
- &:focus {
171
- ~ .custom-file-label {
172
- border-color: $color;
173
- box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
174
- }
175
- }
112
+ .form-check-inline .form-check-input {
113
+ ~ .#{$state}-feedback {
114
+ margin-left: .5em;
176
115
  }
177
116
  }
178
117
  }