bootstrap 4.0.0 → 4.3.1

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 (104) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG.md +8 -0
  4. data/README.md +2 -2
  5. data/Rakefile +4 -2
  6. data/assets/javascripts/bootstrap/alert.js +45 -22
  7. data/assets/javascripts/bootstrap/button.js +39 -19
  8. data/assets/javascripts/bootstrap/carousel.js +213 -51
  9. data/assets/javascripts/bootstrap/collapse.js +105 -52
  10. data/assets/javascripts/bootstrap/dropdown.js +169 -45
  11. data/assets/javascripts/bootstrap/modal.js +139 -71
  12. data/assets/javascripts/bootstrap/popover.js +77 -20
  13. data/assets/javascripts/bootstrap/scrollspy.js +87 -29
  14. data/assets/javascripts/bootstrap/tab.js +50 -32
  15. data/assets/javascripts/bootstrap/toast.js +282 -0
  16. data/assets/javascripts/bootstrap/tooltip.js +295 -59
  17. data/assets/javascripts/bootstrap/util.js +78 -45
  18. data/assets/javascripts/bootstrap-sprockets.js +7 -6
  19. data/assets/javascripts/bootstrap.js +1537 -996
  20. data/assets/javascripts/bootstrap.min.js +3 -3
  21. data/assets/stylesheets/_bootstrap-grid.scss +4 -7
  22. data/assets/stylesheets/_bootstrap-reboot.scss +3 -3
  23. data/assets/stylesheets/_bootstrap.scss +5 -3
  24. data/assets/stylesheets/bootstrap/_alert.scss +1 -1
  25. data/assets/stylesheets/bootstrap/_badge.scss +8 -1
  26. data/assets/stylesheets/bootstrap/_breadcrumb.scss +9 -6
  27. data/assets/stylesheets/bootstrap/_button-group.scss +16 -19
  28. data/assets/stylesheets/bootstrap/_buttons.scss +10 -16
  29. data/assets/stylesheets/bootstrap/_card.scss +53 -34
  30. data/assets/stylesheets/bootstrap/_carousel.scss +66 -60
  31. data/assets/stylesheets/bootstrap/_close.scss +15 -8
  32. data/assets/stylesheets/bootstrap/_code.scss +5 -13
  33. data/assets/stylesheets/bootstrap/_custom-forms.scss +250 -40
  34. data/assets/stylesheets/bootstrap/_dropdown.scss +65 -5
  35. data/assets/stylesheets/bootstrap/_forms.scss +32 -35
  36. data/assets/stylesheets/bootstrap/_functions.scss +9 -9
  37. data/assets/stylesheets/bootstrap/_images.scss +2 -2
  38. data/assets/stylesheets/bootstrap/_input-group.scss +45 -11
  39. data/assets/stylesheets/bootstrap/_jumbotron.scss +1 -0
  40. data/assets/stylesheets/bootstrap/_list-group.scss +39 -5
  41. data/assets/stylesheets/bootstrap/_mixins.scss +6 -1
  42. data/assets/stylesheets/bootstrap/_modal.scss +80 -19
  43. data/assets/stylesheets/bootstrap/_nav.scss +2 -0
  44. data/assets/stylesheets/bootstrap/_navbar.scss +9 -26
  45. data/assets/stylesheets/bootstrap/_pagination.scss +2 -6
  46. data/assets/stylesheets/bootstrap/_popover.scss +47 -59
  47. data/assets/stylesheets/bootstrap/_print.scss +23 -6
  48. data/assets/stylesheets/bootstrap/_progress.scss +16 -6
  49. data/assets/stylesheets/bootstrap/_reboot.scss +51 -50
  50. data/assets/stylesheets/bootstrap/_spinners.scss +55 -0
  51. data/assets/stylesheets/bootstrap/_tables.scss +16 -11
  52. data/assets/stylesheets/bootstrap/_toasts.scss +44 -0
  53. data/assets/stylesheets/bootstrap/_tooltip.scss +1 -1
  54. data/assets/stylesheets/bootstrap/_transitions.scss +4 -20
  55. data/assets/stylesheets/bootstrap/_type.scss +16 -16
  56. data/assets/stylesheets/bootstrap/_utilities.scss +3 -0
  57. data/assets/stylesheets/bootstrap/_variables.scss +430 -201
  58. data/assets/stylesheets/bootstrap/mixins/_badge.scss +7 -2
  59. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +29 -1
  60. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +16 -1
  61. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +3 -3
  62. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +12 -14
  63. data/assets/stylesheets/bootstrap/mixins/_caret.scss +5 -8
  64. data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
  65. data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -0
  66. data/assets/stylesheets/bootstrap/mixins/_forms.scss +68 -13
  67. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +7 -7
  68. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +3 -4
  69. data/assets/stylesheets/bootstrap/mixins/_grid.scss +9 -10
  70. data/assets/stylesheets/bootstrap/mixins/_hover.scss +3 -5
  71. data/assets/stylesheets/bootstrap/mixins/_image.scss +2 -2
  72. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
  73. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -2
  74. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -1
  75. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
  76. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +1 -3
  77. data/assets/stylesheets/bootstrap/mixins/_size.scss +1 -0
  78. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +10 -1
  79. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +5 -3
  80. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +3 -1
  81. data/assets/stylesheets/bootstrap/mixins/_transition.scss +7 -0
  82. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +1 -0
  83. data/assets/stylesheets/bootstrap/utilities/_borders.scss +17 -1
  84. data/assets/stylesheets/bootstrap/utilities/_display.scss +6 -18
  85. data/assets/stylesheets/bootstrap/utilities/_embed.scss +7 -20
  86. data/assets/stylesheets/bootstrap/utilities/_flex.scss +5 -0
  87. data/assets/stylesheets/bootstrap/utilities/_float.scss +5 -3
  88. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +5 -0
  89. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -4
  90. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +6 -0
  91. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +8 -0
  92. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +23 -1
  93. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +19 -0
  94. data/assets/stylesheets/bootstrap/utilities/_text.scss +26 -6
  95. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -2
  96. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +204 -0
  97. data/bootstrap.gemspec +6 -3
  98. data/lib/bootstrap/engine.rb +3 -0
  99. data/lib/bootstrap/version.rb +4 -2
  100. data/lib/bootstrap.rb +10 -7
  101. data/tasks/updater/js.rb +1 -1
  102. data/test/test_helper.rb +7 -6
  103. metadata +19 -12
  104. data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +0 -10
@@ -2,11 +2,16 @@
2
2
  color: color-yiq($bg);
3
3
  background-color: $bg;
4
4
 
5
- &[href] {
5
+ @at-root a#{&} {
6
6
  @include hover-focus {
7
7
  color: color-yiq($bg);
8
- text-decoration: none;
9
8
  background-color: darken($bg, 10%);
10
9
  }
10
+
11
+ &:focus,
12
+ &.focus {
13
+ outline: 0;
14
+ box-shadow: 0 0 0 $badge-focus-width rgba($bg, .5);
15
+ }
11
16
  }
12
17
  }
@@ -1,9 +1,13 @@
1
+ // stylelint-disable property-blacklist
1
2
  // Single side border-radius
2
3
 
3
- @mixin border-radius($radius: $border-radius) {
4
+ @mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
4
5
  @if $enable-rounded {
5
6
  border-radius: $radius;
6
7
  }
8
+ @else if $fallback-border-radius != false {
9
+ border-radius: $fallback-border-radius;
10
+ }
7
11
  }
8
12
 
9
13
  @mixin border-top-radius($radius) {
@@ -33,3 +37,27 @@
33
37
  border-bottom-left-radius: $radius;
34
38
  }
35
39
  }
40
+
41
+ @mixin border-top-left-radius($radius) {
42
+ @if $enable-rounded {
43
+ border-top-left-radius: $radius;
44
+ }
45
+ }
46
+
47
+ @mixin border-top-right-radius($radius) {
48
+ @if $enable-rounded {
49
+ border-top-right-radius: $radius;
50
+ }
51
+ }
52
+
53
+ @mixin border-bottom-right-radius($radius) {
54
+ @if $enable-rounded {
55
+ border-bottom-right-radius: $radius;
56
+ }
57
+ }
58
+
59
+ @mixin border-bottom-left-radius($radius) {
60
+ @if $enable-rounded {
61
+ border-bottom-left-radius: $radius;
62
+ }
63
+ }
@@ -1,5 +1,20 @@
1
1
  @mixin box-shadow($shadow...) {
2
2
  @if $enable-shadows {
3
- box-shadow: $shadow;
3
+ $result: ();
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
+ }
14
+ }
15
+ }
16
+ @if (length($result) > 0) {
17
+ box-shadow: $result;
18
+ }
4
19
  }
5
20
  }
@@ -16,7 +16,7 @@
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 < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
19
+ @return if($n != null and $n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
20
20
  }
21
21
 
22
22
  // Minimum breakpoint width. Null for the smallest (first) breakpoint.
@@ -39,10 +39,10 @@
39
39
  // 767.98px
40
40
  @function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
41
41
  $next: breakpoint-next($name, $breakpoints);
42
- @return if($next, breakpoint-min($next, $breakpoints) - .02px, null);
42
+ @return if($next, breakpoint-min($next, $breakpoints) - .02, null);
43
43
  }
44
44
 
45
- // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash infront.
45
+ // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
46
46
  // Useful for making responsive utilities.
47
47
  //
48
48
  // >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
@@ -19,9 +19,9 @@
19
19
  &.focus {
20
20
  // Avoid using mixin so we can pass custom focus shadow properly
21
21
  @if $enable-shadows {
22
- box-shadow: $btn-box-shadow, 0 0 0 $btn-focus-width rgba($border, .5);
22
+ box-shadow: $btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
23
23
  } @else {
24
- box-shadow: 0 0 0 $btn-focus-width rgba($border, .5);
24
+ box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
25
25
  }
26
26
  }
27
27
 
@@ -31,6 +31,10 @@
31
31
  color: color-yiq($background);
32
32
  background-color: $background;
33
33
  border-color: $border;
34
+ // Remove CSS gradients if they're enabled
35
+ @if $enable-gradients {
36
+ background-image: none;
37
+ }
34
38
  }
35
39
 
36
40
  &:not(:disabled):not(.disabled):active,
@@ -45,10 +49,10 @@
45
49
 
46
50
  &:focus {
47
51
  // Avoid using mixin so we can pass custom focus shadow properly
48
- @if $enable-shadows {
49
- box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($border, .5);
52
+ @if $enable-shadows and $btn-active-box-shadow != none {
53
+ box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
50
54
  } @else {
51
- box-shadow: 0 0 0 $btn-focus-width rgba($border, .5);
55
+ box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
52
56
  }
53
57
  }
54
58
  }
@@ -56,11 +60,9 @@
56
60
 
57
61
  @mixin button-outline-variant($color, $color-hover: color-yiq($color), $active-background: $color, $active-border: $color) {
58
62
  color: $color;
59
- background-color: transparent;
60
- background-image: none;
61
63
  border-color: $color;
62
64
 
63
- &:hover {
65
+ @include hover {
64
66
  color: $color-hover;
65
67
  background-color: $active-background;
66
68
  border-color: $active-border;
@@ -98,12 +100,8 @@
98
100
  // Button sizes
99
101
  @mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
100
102
  padding: $padding-y $padding-x;
101
- font-size: $font-size;
103
+ @include font-size($font-size);
102
104
  line-height: $line-height;
103
105
  // Manually declare to provide an override to the browser default
104
- @if $enable-rounded {
105
- border-radius: $border-radius;
106
- } @else {
107
- border-radius: 0;
108
- }
106
+ @include border-radius($border-radius, 0);
109
107
  }
@@ -14,6 +14,7 @@
14
14
 
15
15
  @mixin caret-right {
16
16
  border-top: $caret-width solid transparent;
17
+ border-right: 0;
17
18
  border-bottom: $caret-width solid transparent;
18
19
  border-left: $caret-width solid;
19
20
  }
@@ -28,10 +29,8 @@
28
29
  @if $enable-caret {
29
30
  &::after {
30
31
  display: inline-block;
31
- width: 0;
32
- height: 0;
33
- margin-left: $caret-width * .85;
34
- vertical-align: $caret-width * .85;
32
+ margin-left: $caret-spacing;
33
+ vertical-align: $caret-vertical-align;
35
34
  content: "";
36
35
  @if $direction == down {
37
36
  @include caret-down;
@@ -49,10 +48,8 @@
49
48
 
50
49
  &::before {
51
50
  display: inline-block;
52
- width: 0;
53
- height: 0;
54
- margin-right: $caret-width * .85;
55
- vertical-align: $caret-width * .85;
51
+ margin-right: $caret-spacing;
52
+ vertical-align: $caret-vertical-align;
56
53
  content: "";
57
54
  @include caret-left;
58
55
  }
@@ -0,0 +1,10 @@
1
+ // Deprecate mixin
2
+ //
3
+ // This mixin can be used to deprecate mixins or functions.
4
+ // `$enable-deprecation-messages` is a global variable, `$ignore-warning` is a variable that can be passed to
5
+ // some deprecated mixins to suppress the warning (for example if the mixin is still be used in the current version of Bootstrap)
6
+ @mixin deprecate($name, $deprecate-version, $remove-version, $ignore-warning: false) {
7
+ @if ($enable-deprecation-messages != false and $ignore-warning != true) {
8
+ @warn "#{$name} has been deprecated as of #{$deprecate-version}. It will be removed entirely in #{$remove-version}.";
9
+ }
10
+ }
@@ -2,10 +2,13 @@
2
2
 
3
3
  @mixin float-left {
4
4
  float: left !important;
5
+ @include deprecate("The `float-left` mixin", "v4.3.0", "v5");
5
6
  }
6
7
  @mixin float-right {
7
8
  float: right !important;
9
+ @include deprecate("The `float-right` mixin", "v4.3.0", "v5");
8
10
  }
9
11
  @mixin float-none {
10
12
  float: none !important;
13
+ @include deprecate("The `float-none` mixin", "v4.3.0", "v5");
11
14
  }
@@ -26,12 +26,12 @@
26
26
  }
27
27
 
28
28
 
29
- @mixin form-validation-state($state, $color) {
29
+ @mixin form-validation-state($state, $color, $icon) {
30
30
  .#{$state}-feedback {
31
31
  display: none;
32
32
  width: 100%;
33
33
  margin-top: $form-feedback-margin-top;
34
- font-size: $form-feedback-font-size;
34
+ @include font-size($form-feedback-font-size);
35
35
  color: $color;
36
36
  }
37
37
 
@@ -41,21 +41,61 @@
41
41
  z-index: 5;
42
42
  display: none;
43
43
  max-width: 100%; // Contain to parent when possible
44
- padding: .5rem;
44
+ padding: $form-feedback-tooltip-padding-y $form-feedback-tooltip-padding-x;
45
45
  margin-top: .1rem;
46
- font-size: .875rem;
47
- line-height: 1;
48
- color: #fff;
49
- background-color: rgba($color, .8);
50
- border-radius: .2rem;
46
+ @include font-size($form-feedback-tooltip-font-size);
47
+ line-height: $form-feedback-tooltip-line-height;
48
+ color: color-yiq($color);
49
+ background-color: rgba($color, $form-feedback-tooltip-opacity);
50
+ @include border-radius($form-feedback-tooltip-border-radius);
51
+ }
52
+
53
+ .form-control {
54
+ .was-validated &:#{$state},
55
+ &.is-#{$state} {
56
+ border-color: $color;
57
+
58
+ @if $enable-validation-icons {
59
+ padding-right: $input-height-inner;
60
+ background-image: $icon;
61
+ background-repeat: no-repeat;
62
+ background-position: center right $input-height-inner-quarter;
63
+ background-size: $input-height-inner-half $input-height-inner-half;
64
+ }
65
+
66
+ &:focus {
67
+ border-color: $color;
68
+ box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
69
+ }
70
+
71
+ ~ .#{$state}-feedback,
72
+ ~ .#{$state}-tooltip {
73
+ display: block;
74
+ }
75
+ }
76
+ }
77
+
78
+ // stylelint-disable-next-line selector-no-qualifying-type
79
+ textarea.form-control {
80
+ .was-validated &:#{$state},
81
+ &.is-#{$state} {
82
+ @if $enable-validation-icons {
83
+ padding-right: $input-height-inner;
84
+ background-position: top $input-height-inner-quarter right $input-height-inner-quarter;
85
+ }
86
+ }
51
87
  }
52
88
 
53
- .form-control,
54
89
  .custom-select {
55
90
  .was-validated &:#{$state},
56
91
  &.is-#{$state} {
57
92
  border-color: $color;
58
93
 
94
+ @if $enable-validation-icons {
95
+ padding-right: $custom-select-feedback-icon-padding-right;
96
+ background: $custom-select-background, $icon $custom-select-bg no-repeat $custom-select-feedback-icon-position / $custom-select-feedback-icon-size;
97
+ }
98
+
59
99
  &:focus {
60
100
  border-color: $color;
61
101
  box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
@@ -68,6 +108,17 @@
68
108
  }
69
109
  }
70
110
 
111
+
112
+ .form-control-file {
113
+ .was-validated &:#{$state},
114
+ &.is-#{$state} {
115
+ ~ .#{$state}-feedback,
116
+ ~ .#{$state}-tooltip {
117
+ display: block;
118
+ }
119
+ }
120
+ }
121
+
71
122
  .form-check-input {
72
123
  .was-validated &:#{$state},
73
124
  &.is-#{$state} {
@@ -89,7 +140,7 @@
89
140
  color: $color;
90
141
 
91
142
  &::before {
92
- background-color: lighten($color, 25%);
143
+ border-color: $color;
93
144
  }
94
145
  }
95
146
 
@@ -100,13 +151,18 @@
100
151
 
101
152
  &:checked {
102
153
  ~ .custom-control-label::before {
154
+ border-color: lighten($color, 10%);
103
155
  @include gradient-bg(lighten($color, 10%));
104
156
  }
105
157
  }
106
158
 
107
159
  &:focus {
108
160
  ~ .custom-control-label::before {
109
- box-shadow: 0 0 0 1px $body-bg, 0 0 0 $input-focus-width rgba($color, .25);
161
+ box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
162
+ }
163
+
164
+ &:not(:checked) ~ .custom-control-label::before {
165
+ border-color: $color;
110
166
  }
111
167
  }
112
168
  }
@@ -118,8 +174,6 @@
118
174
  &.is-#{$state} {
119
175
  ~ .custom-file-label {
120
176
  border-color: $color;
121
-
122
- &::before { border-color: inherit; }
123
177
  }
124
178
 
125
179
  ~ .#{$state}-feedback,
@@ -129,6 +183,7 @@
129
183
 
130
184
  &:focus {
131
185
  ~ .custom-file-label {
186
+ border-color: $color;
132
187
  box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
133
188
  }
134
189
  }
@@ -11,7 +11,7 @@
11
11
  // Horizontal gradient, from left to right
12
12
  //
13
13
  // Creates two color stops, start and end, by specifying a color and position for each color stop.
14
- @mixin gradient-x($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
14
+ @mixin gradient-x($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
15
15
  background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
16
16
  background-repeat: repeat-x;
17
17
  }
@@ -19,27 +19,27 @@
19
19
  // Vertical gradient, from top to bottom
20
20
  //
21
21
  // Creates two color stops, start and end, by specifying a color and position for each color stop.
22
- @mixin gradient-y($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
22
+ @mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
23
23
  background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
24
24
  background-repeat: repeat-x;
25
25
  }
26
26
 
27
- @mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
27
+ @mixin gradient-directional($start-color: $gray-700, $end-color: $gray-800, $deg: 45deg) {
28
28
  background-image: linear-gradient($deg, $start-color, $end-color);
29
29
  background-repeat: repeat-x;
30
30
  }
31
- @mixin gradient-x-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
31
+ @mixin gradient-x-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
32
32
  background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
33
33
  background-repeat: no-repeat;
34
34
  }
35
- @mixin gradient-y-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
35
+ @mixin gradient-y-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
36
36
  background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
37
37
  background-repeat: no-repeat;
38
38
  }
39
- @mixin gradient-radial($inner-color: #555, $outer-color: #333) {
39
+ @mixin gradient-radial($inner-color: $gray-700, $outer-color: $gray-800) {
40
40
  background-image: radial-gradient(circle, $inner-color, $outer-color);
41
41
  background-repeat: no-repeat;
42
42
  }
43
- @mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
43
+ @mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) {
44
44
  background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
45
45
  }
@@ -8,9 +8,8 @@
8
8
  %grid-column {
9
9
  position: relative;
10
10
  width: 100%;
11
- min-height: 1px; // Prevent columns from collapsing when empty
12
- padding-right: ($gutter / 2);
13
- padding-left: ($gutter / 2);
11
+ padding-right: $gutter / 2;
12
+ padding-left: $gutter / 2;
14
13
  }
15
14
 
16
15
  @each $breakpoint in map-keys($breakpoints) {
@@ -37,7 +36,7 @@
37
36
  .col#{$infix}-auto {
38
37
  flex: 0 0 auto;
39
38
  width: auto;
40
- max-width: none; // Reset earlier grid tiers
39
+ max-width: 100%; // Reset earlier grid tiers
41
40
  }
42
41
 
43
42
  @for $i from 1 through $columns {
@@ -2,10 +2,10 @@
2
2
  //
3
3
  // Generate semantic grid columns with these mixins.
4
4
 
5
- @mixin make-container() {
5
+ @mixin make-container($gutter: $grid-gutter-width) {
6
6
  width: 100%;
7
- padding-right: ($grid-gutter-width / 2);
8
- padding-left: ($grid-gutter-width / 2);
7
+ padding-right: $gutter / 2;
8
+ padding-left: $gutter / 2;
9
9
  margin-right: auto;
10
10
  margin-left: auto;
11
11
  }
@@ -20,22 +20,21 @@
20
20
  }
21
21
  }
22
22
 
23
- @mixin make-row() {
23
+ @mixin make-row($gutter: $grid-gutter-width) {
24
24
  display: flex;
25
25
  flex-wrap: wrap;
26
- margin-right: ($grid-gutter-width / -2);
27
- margin-left: ($grid-gutter-width / -2);
26
+ margin-right: -$gutter / 2;
27
+ margin-left: -$gutter / 2;
28
28
  }
29
29
 
30
- @mixin make-col-ready() {
30
+ @mixin make-col-ready($gutter: $grid-gutter-width) {
31
31
  position: relative;
32
32
  // Prevent columns from becoming too narrow when at smaller grid tiers by
33
33
  // always setting `width: 100%;`. This works because we use `flex` values
34
34
  // later on to override this initial width.
35
35
  width: 100%;
36
- min-height: 1px; // Prevent collapsing
37
- padding-right: ($grid-gutter-width / 2);
38
- padding-left: ($grid-gutter-width / 2);
36
+ padding-right: $gutter / 2;
37
+ padding-left: $gutter / 2;
39
38
  }
40
39
 
41
40
  @mixin make-col($size, $columns: $grid-columns) {
@@ -1,13 +1,11 @@
1
- // stylelint-disable indentation
2
-
3
1
  // Hover mixin and `$enable-hover-media-query` are deprecated.
4
2
  //
5
- // Origally added during our alphas and maintained during betas, this mixin was
6
- // designed to prevent `:hover` stickiness on iOSan issue where hover styles
3
+ // Originally added during our alphas and maintained during betas, this mixin was
4
+ // designed to prevent `:hover` stickiness on iOS-an issue where hover styles
7
5
  // would persist after initial touch.
8
6
  //
9
7
  // For backward compatibility, we've kept these mixins and updated them to
10
- // always return their regular psuedo-classes instead of a shimmed media query.
8
+ // always return their regular pseudo-classes instead of a shimmed media query.
11
9
  //
12
10
  // Issue: https://github.com/twbs/bootstrap/issues/25195
13
11
 
@@ -20,7 +20,6 @@
20
20
  //
21
21
  // Short retina mixin for setting background-image and -size.
22
22
 
23
- // stylelint-disable indentation, media-query-list-comma-newline-after
24
23
  @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
25
24
  background-image: url($file-1x);
26
25
 
@@ -29,8 +28,9 @@
29
28
  // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard.
30
29
  // Compatibility info: https://caniuse.com/#feat=css-media-resolution
31
30
  @media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
32
- only screen and (min-resolution: 2dppx) { // Standardized
31
+ only screen and (min-resolution: 2dppx) { // Standardized
33
32
  background-image: url($file-2x);
34
33
  background-size: $width-1x $height-1x;
35
34
  }
35
+ @include deprecate("`img-retina()`", "v4.3.0", "v5");
36
36
  }
@@ -12,7 +12,7 @@
12
12
  }
13
13
 
14
14
  &.active {
15
- color: #fff;
15
+ color: $white;
16
16
  background-color: $color;
17
17
  border-color: $color;
18
18
  }
@@ -2,9 +2,9 @@
2
2
  //
3
3
  // Dividers (basically an hr) within dropdowns and nav lists
4
4
 
5
- @mixin nav-divider($color: #e5e5e5) {
5
+ @mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y) {
6
6
  height: 0;
7
- margin: ($spacer / 2) 0;
7
+ margin: $margin-y 0;
8
8
  overflow: hidden;
9
9
  border-top: 1px solid $color;
10
10
  }
@@ -3,7 +3,7 @@
3
3
  @mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
4
4
  .page-link {
5
5
  padding: $padding-y $padding-x;
6
- font-size: $font-size;
6
+ @include font-size($font-size);
7
7
  line-height: $line-height;
8
8
  }
9
9
 
@@ -5,7 +5,7 @@
5
5
  font-weight: $font-weight-normal;
6
6
  line-height: $line-height-base;
7
7
  text-align: left; // Fallback for where `start` is not supported
8
- text-align: start; // stylelint-disable-line declaration-block-no-duplicate-properties
8
+ text-align: start;
9
9
  text-decoration: none;
10
10
  text-shadow: none;
11
11
  text-transform: none;
@@ -1,6 +1,6 @@
1
1
  // Only display content to screen readers
2
2
  //
3
- // See: http://a11yproject.com/posts/how-to-hide-content/
3
+ // See: https://a11yproject.com/posts/how-to-hide-content/
4
4
  // See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
5
5
 
6
6
  @mixin sr-only {
@@ -11,7 +11,6 @@
11
11
  overflow: hidden;
12
12
  clip: rect(0, 0, 0, 0);
13
13
  white-space: nowrap;
14
- clip-path: inset(50%);
15
14
  border: 0;
16
15
  }
17
16
 
@@ -30,6 +29,5 @@
30
29
  overflow: visible;
31
30
  clip: auto;
32
31
  white-space: normal;
33
- clip-path: none;
34
32
  }
35
33
  }
@@ -3,4 +3,5 @@
3
3
  @mixin size($width, $height: $width) {
4
4
  width: $width;
5
5
  height: $height;
6
+ @include deprecate("`size()`", "v4.3.0", "v5");
6
7
  }
@@ -1,6 +1,6 @@
1
1
  // Tables
2
2
 
3
- @mixin table-row-variant($state, $background) {
3
+ @mixin table-row-variant($state, $background, $border: null) {
4
4
  // Exact selectors below required to override `.table-striped` and prevent
5
5
  // inheritance to nested tables.
6
6
  .table-#{$state} {
@@ -9,6 +9,15 @@
9
9
  > td {
10
10
  background-color: $background;
11
11
  }
12
+
13
+ @if $border != null {
14
+ th,
15
+ td,
16
+ thead th,
17
+ tbody + tbody {
18
+ border-color: $border;
19
+ }
20
+ }
12
21
  }
13
22
 
14
23
  // Hover states for `.table-hover`
@@ -6,9 +6,11 @@
6
6
  #{$parent} {
7
7
  color: $color !important;
8
8
  }
9
- a#{$parent} {
10
- @include hover-focus {
11
- color: darken($color, 10%) !important;
9
+ @if $emphasized-link-hover-darken-percentage != 0 {
10
+ a#{$parent} {
11
+ @include hover-focus {
12
+ color: darken($color, $emphasized-link-hover-darken-percentage) !important;
13
+ }
12
14
  }
13
15
  }
14
16
  }
@@ -1,9 +1,11 @@
1
1
  // CSS image replacement
2
- @mixin text-hide() {
2
+ @mixin text-hide($ignore-warning: false) {
3
3
  // stylelint-disable-next-line font-family-no-missing-generic-family-keyword
4
4
  font: 0/0 a;
5
5
  color: transparent;
6
6
  text-shadow: none;
7
7
  background-color: transparent;
8
8
  border: 0;
9
+
10
+ @include deprecate("`text-hide()`", "v4.1.0", "v5", $ignore-warning);
9
11
  }
@@ -1,3 +1,4 @@
1
+ // stylelint-disable property-blacklist
1
2
  @mixin transition($transition...) {
2
3
  @if $enable-transitions {
3
4
  @if length($transition) == 0 {
@@ -6,4 +7,10 @@
6
7
  transition: $transition;
7
8
  }
8
9
  }
10
+
11
+ @if $enable-prefers-reduced-motion-media-query {
12
+ @media (prefers-reduced-motion: reduce) {
13
+ transition: none;
14
+ }
15
+ }
9
16
  }