bootstrap 4.0.0.beta3 → 4.6.2

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 (114) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +15 -1
  3. data/CHANGELOG.md +2 -2
  4. data/README.md +2 -2
  5. data/Rakefile +4 -2
  6. data/assets/javascripts/bootstrap/alert.js +79 -68
  7. data/assets/javascripts/bootstrap/button.js +140 -78
  8. data/assets/javascripts/bootstrap/carousel.js +294 -158
  9. data/assets/javascripts/bootstrap/collapse.js +157 -133
  10. data/assets/javascripts/bootstrap/dropdown.js +257 -167
  11. data/assets/javascripts/bootstrap/modal.js +285 -204
  12. data/assets/javascripts/bootstrap/popover.js +101 -60
  13. data/assets/javascripts/bootstrap/scrollspy.js +127 -106
  14. data/assets/javascripts/bootstrap/tab.js +113 -101
  15. data/assets/javascripts/bootstrap/toast.js +267 -0
  16. data/assets/javascripts/bootstrap/tooltip.js +406 -188
  17. data/assets/javascripts/bootstrap/util.js +106 -55
  18. data/assets/javascripts/bootstrap-sprockets.js +1 -0
  19. data/assets/javascripts/bootstrap.js +1946 -1482
  20. data/assets/javascripts/bootstrap.min.js +4 -4
  21. data/assets/stylesheets/_bootstrap-grid.scss +7 -12
  22. data/assets/stylesheets/_bootstrap-reboot.scss +4 -4
  23. data/assets/stylesheets/_bootstrap.scss +6 -4
  24. data/assets/stylesheets/bootstrap/_alert.scss +3 -2
  25. data/assets/stylesheets/bootstrap/_badge.scss +8 -1
  26. data/assets/stylesheets/bootstrap/_breadcrumb.scss +10 -6
  27. data/assets/stylesheets/bootstrap/_button-group.scss +17 -20
  28. data/assets/stylesheets/bootstrap/_buttons.scss +23 -28
  29. data/assets/stylesheets/bootstrap/_card.scss +77 -61
  30. data/assets/stylesheets/bootstrap/_carousel.scss +72 -63
  31. data/assets/stylesheets/bootstrap/_close.scss +15 -9
  32. data/assets/stylesheets/bootstrap/_code.scss +6 -14
  33. data/assets/stylesheets/bootstrap/_custom-forms.scss +287 -43
  34. data/assets/stylesheets/bootstrap/_dropdown.scss +70 -9
  35. data/assets/stylesheets/bootstrap/_forms.scss +56 -42
  36. data/assets/stylesheets/bootstrap/_functions.scss +117 -13
  37. data/assets/stylesheets/bootstrap/_grid.scss +32 -11
  38. data/assets/stylesheets/bootstrap/_images.scss +4 -4
  39. data/assets/stylesheets/bootstrap/_input-group.scss +80 -25
  40. data/assets/stylesheets/bootstrap/_jumbotron.scss +2 -1
  41. data/assets/stylesheets/bootstrap/_list-group.scss +63 -24
  42. data/assets/stylesheets/bootstrap/_mixins.scss +9 -4
  43. data/assets/stylesheets/bootstrap/_modal.scss +96 -24
  44. data/assets/stylesheets/bootstrap/_nav.scss +14 -7
  45. data/assets/stylesheets/bootstrap/_navbar.scss +66 -45
  46. data/assets/stylesheets/bootstrap/_pagination.scss +10 -8
  47. data/assets/stylesheets/bootstrap/_popover.scss +56 -69
  48. data/assets/stylesheets/bootstrap/_print.scss +41 -19
  49. data/assets/stylesheets/bootstrap/_progress.scss +20 -6
  50. data/assets/stylesheets/bootstrap/_reboot.scss +88 -109
  51. data/assets/stylesheets/bootstrap/_spinners.scss +65 -0
  52. data/assets/stylesheets/bootstrap/_tables.scss +19 -14
  53. data/assets/stylesheets/bootstrap/_toasts.scss +46 -0
  54. data/assets/stylesheets/bootstrap/_tooltip.scss +6 -6
  55. data/assets/stylesheets/bootstrap/_transitions.scss +10 -20
  56. data/assets/stylesheets/bootstrap/_type.scss +19 -19
  57. data/assets/stylesheets/bootstrap/_utilities.scss +4 -0
  58. data/assets/stylesheets/bootstrap/_variables.scss +492 -215
  59. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +5 -3
  60. data/assets/stylesheets/bootstrap/mixins/_badge.scss +8 -3
  61. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +51 -10
  62. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +16 -1
  63. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +11 -9
  64. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +35 -26
  65. data/assets/stylesheets/bootstrap/mixins/_caret.scss +13 -16
  66. data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
  67. data/assets/stylesheets/bootstrap/mixins/_float.scss +6 -3
  68. data/assets/stylesheets/bootstrap/mixins/_forms.scss +102 -40
  69. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +7 -7
  70. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +36 -25
  71. data/assets/stylesheets/bootstrap/mixins/_grid.scss +34 -17
  72. data/assets/stylesheets/bootstrap/mixins/_hover.scss +27 -51
  73. data/assets/stylesheets/bootstrap/mixins/_image.scss +4 -4
  74. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +10 -13
  75. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  76. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +3 -2
  77. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -1
  78. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +3 -3
  79. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +5 -6
  80. data/assets/stylesheets/bootstrap/mixins/_size.scss +1 -0
  81. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +11 -2
  82. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +7 -4
  83. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +3 -1
  84. data/assets/stylesheets/bootstrap/mixins/_transition.scss +20 -3
  85. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +1 -0
  86. data/assets/stylesheets/bootstrap/utilities/_background.scss +2 -2
  87. data/assets/stylesheets/bootstrap/utilities/_borders.scss +23 -2
  88. data/assets/stylesheets/bootstrap/utilities/_display.scss +6 -36
  89. data/assets/stylesheets/bootstrap/utilities/_embed.scss +7 -20
  90. data/assets/stylesheets/bootstrap/utilities/_flex.scss +5 -0
  91. data/assets/stylesheets/bootstrap/utilities/_float.scss +5 -3
  92. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
  93. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +5 -0
  94. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -4
  95. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +6 -0
  96. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +8 -0
  97. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +23 -1
  98. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +19 -0
  99. data/assets/stylesheets/bootstrap/utilities/_text.scss +28 -8
  100. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -2
  101. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +228 -0
  102. data/bootstrap.gemspec +7 -4
  103. data/lib/bootstrap/engine.rb +3 -0
  104. data/lib/bootstrap/version.rb +4 -2
  105. data/lib/bootstrap.rb +10 -7
  106. data/tasks/updater/js.rb +18 -6
  107. data/tasks/updater/network.rb +8 -2
  108. data/test/dummy_rails/app/assets/config/manifest.js +3 -0
  109. data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
  110. data/test/gemfiles/rails_6_0.gemfile +7 -0
  111. data/test/support/dummy_rails_integration.rb +3 -1
  112. data/test/test_helper.rb +21 -15
  113. metadata +29 -16
  114. data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +0 -10
@@ -7,8 +7,11 @@
7
7
  .form-control {
8
8
  display: block;
9
9
  width: 100%;
10
+ height: $input-height;
10
11
  padding: $input-padding-y $input-padding-x;
11
- font-size: $font-size-base;
12
+ font-family: $input-font-family;
13
+ @include font-size($input-font-size);
14
+ font-weight: $input-font-weight;
12
15
  line-height: $input-line-height;
13
16
  color: $input-color;
14
17
  background-color: $input-bg;
@@ -16,13 +19,7 @@
16
19
  border: $input-border-width solid $input-border-color;
17
20
 
18
21
  // Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
19
- @if $enable-rounded {
20
- // Manually use the if/else instead of the mixin to account for iOS override
21
- border-radius: $input-border-radius;
22
- } @else {
23
- // Otherwise undo the iOS default
24
- border-radius: 0;
25
- }
22
+ @include border-radius($input-border-radius, 0);
26
23
 
27
24
  @include box-shadow($input-box-shadow);
28
25
  @include transition($input-transition);
@@ -34,7 +31,7 @@
34
31
  }
35
32
 
36
33
  // Customize the `:focus` state to imitate native WebKit styles.
37
- @include form-control-focus();
34
+ @include form-control-focus($ignore-warning: true);
38
35
 
39
36
  // Placeholder
40
37
  &::placeholder {
@@ -56,9 +53,20 @@
56
53
  }
57
54
  }
58
55
 
56
+ input[type="date"],
57
+ input[type="time"],
58
+ input[type="datetime-local"],
59
+ input[type="month"] {
60
+ &.form-control {
61
+ appearance: none; // Fix appearance for date inputs in Safari
62
+ }
63
+ }
64
+
59
65
  select.form-control {
60
- &:not([size]):not([multiple]) {
61
- height: $input-height;
66
+ // Remove select outline from select box in FF
67
+ &:-moz-focusring {
68
+ color: transparent;
69
+ text-shadow: 0 0 0 $input-color;
62
70
  }
63
71
 
64
72
  &:focus::-ms-value {
@@ -87,24 +95,24 @@ select.form-control {
87
95
  // For use with horizontal and inline forms, when you need the label (or legend)
88
96
  // text to align with the form controls.
89
97
  .col-form-label {
90
- padding-top: calc(#{$input-padding-y} + #{$input-border-width});
91
- padding-bottom: calc(#{$input-padding-y} + #{$input-border-width});
98
+ padding-top: add($input-padding-y, $input-border-width);
99
+ padding-bottom: add($input-padding-y, $input-border-width);
92
100
  margin-bottom: 0; // Override the `<label>/<legend>` default
93
- font-size: inherit; // Override the `<legend>` default
101
+ @include font-size(inherit); // Override the `<legend>` default
94
102
  line-height: $input-line-height;
95
103
  }
96
104
 
97
105
  .col-form-label-lg {
98
- padding-top: calc(#{$input-padding-y-lg} + #{$input-border-width});
99
- padding-bottom: calc(#{$input-padding-y-lg} + #{$input-border-width});
100
- font-size: $font-size-lg;
106
+ padding-top: add($input-padding-y-lg, $input-border-width);
107
+ padding-bottom: add($input-padding-y-lg, $input-border-width);
108
+ @include font-size($input-font-size-lg);
101
109
  line-height: $input-line-height-lg;
102
110
  }
103
111
 
104
112
  .col-form-label-sm {
105
- padding-top: calc(#{$input-padding-y-sm} + #{$input-border-width});
106
- padding-bottom: calc(#{$input-padding-y-sm} + #{$input-border-width});
107
- font-size: $font-size-sm;
113
+ padding-top: add($input-padding-y-sm, $input-border-width);
114
+ padding-bottom: add($input-padding-y-sm, $input-border-width);
115
+ @include font-size($input-font-size-sm);
108
116
  line-height: $input-line-height-sm;
109
117
  }
110
118
 
@@ -117,10 +125,11 @@ select.form-control {
117
125
  .form-control-plaintext {
118
126
  display: block;
119
127
  width: 100%;
120
- padding-top: $input-padding-y;
121
- padding-bottom: $input-padding-y;
128
+ padding: $input-padding-y 0;
122
129
  margin-bottom: 0; // match inputs if this class comes on inputs with default margins
130
+ @include font-size($input-font-size);
123
131
  line-height: $input-line-height;
132
+ color: $input-plaintext-color;
124
133
  background-color: transparent;
125
134
  border: solid transparent;
126
135
  border-width: $input-border-width 0;
@@ -138,35 +147,35 @@ select.form-control {
138
147
  // Build on `.form-control` with modifier classes to decrease or increase the
139
148
  // height and font-size of form controls.
140
149
  //
141
- // The `.form-group-* form-control` variations are sadly duplicated to avoid the
142
- // issue documented in https://github.com/twbs/bootstrap/issues/15074.
150
+ // Repeated in `_input_group.scss` to avoid Sass extend issues.
143
151
 
144
152
  .form-control-sm {
153
+ height: $input-height-sm;
145
154
  padding: $input-padding-y-sm $input-padding-x-sm;
146
- font-size: $font-size-sm;
155
+ @include font-size($input-font-size-sm);
147
156
  line-height: $input-line-height-sm;
148
157
  @include border-radius($input-border-radius-sm);
149
158
  }
150
159
 
151
- select.form-control-sm {
152
- &:not([size]):not([multiple]) {
153
- height: $input-height-sm;
154
- }
155
- }
156
-
157
160
  .form-control-lg {
161
+ height: $input-height-lg;
158
162
  padding: $input-padding-y-lg $input-padding-x-lg;
159
- font-size: $font-size-lg;
163
+ @include font-size($input-font-size-lg);
160
164
  line-height: $input-line-height-lg;
161
165
  @include border-radius($input-border-radius-lg);
162
166
  }
163
167
 
164
- select.form-control-lg {
165
- &:not([size]):not([multiple]) {
166
- height: $input-height-lg;
168
+ // stylelint-disable-next-line no-duplicate-selectors
169
+ select.form-control {
170
+ &[size],
171
+ &[multiple] {
172
+ height: auto;
167
173
  }
168
174
  }
169
175
 
176
+ textarea.form-control {
177
+ height: auto;
178
+ }
170
179
 
171
180
  // Form groups
172
181
  //
@@ -190,13 +199,13 @@ select.form-control-lg {
190
199
  .form-row {
191
200
  display: flex;
192
201
  flex-wrap: wrap;
193
- margin-right: -5px;
194
- margin-left: -5px;
202
+ margin-right: -$form-grid-gutter-width * .5;
203
+ margin-left: -$form-grid-gutter-width * .5;
195
204
 
196
205
  > .col,
197
206
  > [class*="col-"] {
198
- padding-right: 5px;
199
- padding-left: 5px;
207
+ padding-right: $form-grid-gutter-width * .5;
208
+ padding-left: $form-grid-gutter-width * .5;
200
209
  }
201
210
  }
202
211
 
@@ -216,6 +225,8 @@ select.form-control-lg {
216
225
  margin-top: $form-check-input-margin-y;
217
226
  margin-left: -$form-check-input-gutter;
218
227
 
228
+ // Use [disabled] and :disabled for workaround https://github.com/twbs/bootstrap/issues/28247
229
+ &[disabled] ~ .form-check-label,
219
230
  &:disabled ~ .form-check-label {
220
231
  color: $text-muted;
221
232
  }
@@ -248,8 +259,9 @@ select.form-control-lg {
248
259
  // pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
249
260
  // server side validation.
250
261
 
251
- @include form-validation-state("valid", $form-feedback-valid-color);
252
- @include form-validation-state("invalid", $form-feedback-invalid-color);
262
+ @each $state, $data in $form-validation-states {
263
+ @include form-validation-state($state, map-get($data, color), map-get($data, icon));
264
+ }
253
265
 
254
266
  // Inline forms
255
267
  //
@@ -302,7 +314,8 @@ select.form-control-lg {
302
314
  display: inline-block;
303
315
  }
304
316
 
305
- .input-group {
317
+ .input-group,
318
+ .custom-select {
306
319
  width: auto;
307
320
  }
308
321
 
@@ -317,6 +330,7 @@ select.form-control-lg {
317
330
  }
318
331
  .form-check-input {
319
332
  position: relative;
333
+ flex-shrink: 0;
320
334
  margin-top: 0;
321
335
  margin-right: $form-check-input-margin-x;
322
336
  margin-left: 0;
@@ -1,6 +1,6 @@
1
1
  // Bootstrap functions
2
2
  //
3
- // Utility mixins and functions for evalutating source code across our variables, maps, and mixins.
3
+ // Utility mixins and functions for evaluating source code across our variables, maps, and mixins.
4
4
 
5
5
  // Ascending
6
6
  // Used to evaluate Sass maps like our grid breakpoints.
@@ -8,7 +8,7 @@
8
8
  $prev-key: null;
9
9
  $prev-num: null;
10
10
  @each $key, $num in $map {
11
- @if $prev-num == null {
11
+ @if $prev-num == null or unit($num) == "%" or unit($prev-num) == "%" {
12
12
  // Do nothing
13
13
  } @else if not comparable($prev-num, $num) {
14
14
  @warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
@@ -21,12 +21,14 @@
21
21
  }
22
22
 
23
23
  // Starts at zero
24
- // Another grid mixin that ensures the min-width of the lowest breakpoint starts at 0.
25
- @mixin _assert-starts-at-zero($map) {
26
- $values: map-values($map);
27
- $first-value: nth($values, 1);
28
- @if $first-value != 0 {
29
- @warn "First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}.";
24
+ // Used to ensure the min-width of the lowest breakpoint starts at 0.
25
+ @mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
26
+ @if length($map) > 0 {
27
+ $values: map-values($map);
28
+ $first-value: nth($values, 1);
29
+ @if $first-value != 0 {
30
+ @warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
31
+ }
30
32
  }
31
33
  }
32
34
 
@@ -48,18 +50,37 @@
48
50
  @return $string;
49
51
  }
50
52
 
53
+ // See https://codepen.io/kevinweber/pen/dXWoRw
54
+ //
55
+ // Requires the use of quotes around data URIs.
56
+
57
+ @function escape-svg($string) {
58
+ @if str-index($string, "data:image/svg+xml") {
59
+ @each $char, $encoded in $escaped-characters {
60
+ // Do not escape the url brackets
61
+ @if str-index($string, "url(") == 1 {
62
+ $string: url("#{str-replace(str-slice($string, 6, -3), $char, $encoded)}");
63
+ } @else {
64
+ $string: str-replace($string, $char, $encoded);
65
+ }
66
+ }
67
+ }
68
+
69
+ @return $string;
70
+ }
71
+
51
72
  // Color contrast
52
- @function color-yiq($color) {
73
+ @function color-yiq($color, $dark: $yiq-text-dark, $light: $yiq-text-light) {
53
74
  $r: red($color);
54
75
  $g: green($color);
55
76
  $b: blue($color);
56
77
 
57
- $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
78
+ $yiq: (($r * 299) + ($g * 587) + ($b * 114)) * .001;
58
79
 
59
80
  @if ($yiq >= $yiq-contrasted-threshold) {
60
- @return $yiq-text-dark;
81
+ @return $dark;
61
82
  } @else {
62
- @return $yiq-text-light;
83
+ @return $light;
63
84
  }
64
85
  }
65
86
 
@@ -79,8 +100,91 @@
79
100
  // Request a theme color level
80
101
  @function theme-color-level($color-name: "primary", $level: 0) {
81
102
  $color: theme-color($color-name);
82
- $color-base: if($level > 0, #000, #fff);
103
+ $color-base: if($level > 0, $black, $white);
83
104
  $level: abs($level);
84
105
 
85
106
  @return mix($color-base, $color, $level * $theme-color-interval);
86
107
  }
108
+
109
+ // Return valid calc
110
+ @function add($value1, $value2, $return-calc: true) {
111
+ @if $value1 == null {
112
+ @return $value2;
113
+ }
114
+
115
+ @if $value2 == null {
116
+ @return $value1;
117
+ }
118
+
119
+ @if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
120
+ @return $value1 + $value2;
121
+ }
122
+
123
+ @return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2);
124
+ }
125
+
126
+ @function subtract($value1, $value2, $return-calc: true) {
127
+ @if $value1 == null and $value2 == null {
128
+ @return null;
129
+ }
130
+
131
+ @if $value1 == null {
132
+ @return -$value2;
133
+ }
134
+
135
+ @if $value2 == null {
136
+ @return $value1;
137
+ }
138
+
139
+ @if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
140
+ @return $value1 - $value2;
141
+ }
142
+
143
+ @if type-of($value2) != number {
144
+ $value2: unquote("(") + $value2 + unquote(")");
145
+ }
146
+
147
+ @return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2);
148
+ }
149
+
150
+ @function divide($dividend, $divisor, $precision: 10) {
151
+ $sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
152
+ $dividend: abs($dividend);
153
+ $divisor: abs($divisor);
154
+ @if $dividend == 0 {
155
+ @return 0;
156
+ }
157
+ @if $divisor == 0 {
158
+ @error "Cannot divide by 0";
159
+ }
160
+ $remainder: $dividend;
161
+ $result: 0;
162
+ $factor: 10;
163
+ @while ($remainder > 0 and $precision >= 0) {
164
+ $quotient: 0;
165
+ @while ($remainder >= $divisor) {
166
+ $remainder: $remainder - $divisor;
167
+ $quotient: $quotient + 1;
168
+ }
169
+ $result: $result * 10 + $quotient;
170
+ $factor: $factor * .1;
171
+ $remainder: $remainder * 10;
172
+ $precision: $precision - 1;
173
+ @if ($precision < 0 and $remainder >= $divisor * 5) {
174
+ $result: $result + 1;
175
+ }
176
+ }
177
+ $result: $result * $factor * $sign;
178
+ $dividend-unit: unit($dividend);
179
+ $divisor-unit: unit($divisor);
180
+ $unit-map: (
181
+ "px": 1px,
182
+ "rem": 1rem,
183
+ "em": 1em,
184
+ "%": 1%
185
+ );
186
+ @if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {
187
+ $result: $result * map-get($unit-map, $dividend-unit);
188
+ }
189
+ @return $result;
190
+ }
@@ -3,26 +3,47 @@
3
3
  // Set the container width, and override it for fixed navbars in media queries.
4
4
 
5
5
  @if $enable-grid-classes {
6
- .container {
6
+ // Single container class with breakpoint max-widths
7
+ .container,
8
+ // 100% wide container at all breakpoints
9
+ .container-fluid {
7
10
  @include make-container();
8
- @include make-container-max-widths();
9
11
  }
10
- }
11
12
 
12
- // Fluid container
13
- //
14
- // Utilizes the mixin meant for fixed width containers, but with 100% width for
15
- // fluid, full width layouts.
13
+ // Responsive containers that are 100% wide until a breakpoint
14
+ @each $breakpoint, $container-max-width in $container-max-widths {
15
+ .container-#{$breakpoint} {
16
+ @extend .container-fluid;
17
+ }
16
18
 
17
- @if $enable-grid-classes {
18
- .container-fluid {
19
- @include make-container();
19
+ @include media-breakpoint-up($breakpoint, $grid-breakpoints) {
20
+ %responsive-container-#{$breakpoint} {
21
+ max-width: $container-max-width;
22
+ }
23
+
24
+ // Extend each breakpoint which is smaller or equal to the current breakpoint
25
+ $extend-breakpoint: true;
26
+
27
+ @each $name, $width in $grid-breakpoints {
28
+ @if ($extend-breakpoint) {
29
+ .container#{breakpoint-infix($name, $grid-breakpoints)} {
30
+ @extend %responsive-container-#{$breakpoint};
31
+ }
32
+
33
+ // Once the current breakpoint is reached, stop extending
34
+ @if ($breakpoint == $name) {
35
+ $extend-breakpoint: false;
36
+ }
37
+ }
38
+ }
39
+ }
20
40
  }
21
41
  }
22
42
 
43
+
23
44
  // Row
24
45
  //
25
- // Rows contain and clear the floats of your columns.
46
+ // Rows contain your columns.
26
47
 
27
48
  @if $enable-grid-classes {
28
49
  .row {
@@ -6,7 +6,7 @@
6
6
  // which weren't expecting the images within themselves to be involuntarily resized.
7
7
  // See also https://github.com/twbs/bootstrap/issues/18178
8
8
  .img-fluid {
9
- @include img-fluid;
9
+ @include img-fluid();
10
10
  }
11
11
 
12
12
 
@@ -19,7 +19,7 @@
19
19
  @include box-shadow($thumbnail-box-shadow);
20
20
 
21
21
  // Keep them at most 100% wide
22
- @include img-fluid;
22
+ @include img-fluid();
23
23
  }
24
24
 
25
25
  //
@@ -32,11 +32,11 @@
32
32
  }
33
33
 
34
34
  .figure-img {
35
- margin-bottom: ($spacer / 2);
35
+ margin-bottom: $spacer * .5;
36
36
  line-height: 1;
37
37
  }
38
38
 
39
39
  .figure-caption {
40
- font-size: $figure-caption-font-size;
40
+ @include font-size($figure-caption-font-size);
41
41
  color: $figure-caption-color;
42
42
  }
@@ -11,42 +11,67 @@
11
11
  align-items: stretch;
12
12
  width: 100%;
13
13
 
14
- .form-control,
15
- .custom-select,
16
- .custom-file {
14
+ > .form-control,
15
+ > .form-control-plaintext,
16
+ > .custom-select,
17
+ > .custom-file {
17
18
  position: relative; // For focus state's z-index
18
19
  flex: 1 1 auto;
19
- // Add width 1% and flex-basis auto to ensure that button will not wrap out
20
- // the column. Applies to IE Edge+ and Firefox. Chrome does not require this.
21
20
  width: 1%;
21
+ min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
22
22
  margin-bottom: 0;
23
23
 
24
- // Bring the "active" form control to the top of surrounding elements
25
- &:focus {
26
- z-index: 3;
27
- }
28
-
29
- + .form-control {
24
+ + .form-control,
25
+ + .custom-select,
26
+ + .custom-file {
30
27
  margin-left: -$input-border-width;
31
28
  }
32
29
  }
33
30
 
34
- .form-control,
35
- .custom-select {
36
- &:not(:last-child) { @include border-right-radius(0); }
31
+ // Bring the "active" form control to the top of surrounding elements
32
+ > .form-control:focus,
33
+ > .custom-select:focus,
34
+ > .custom-file .custom-file-input:focus ~ .custom-file-label {
35
+ z-index: 3;
36
+ }
37
+
38
+ // Bring the custom file input above the label
39
+ > .custom-file .custom-file-input:focus {
40
+ z-index: 4;
41
+ }
42
+
43
+ > .form-control,
44
+ > .custom-select {
37
45
  &:not(:first-child) { @include border-left-radius(0); }
38
46
  }
39
47
 
40
48
  // Custom file inputs have more complex markup, thus requiring different
41
49
  // border-radius overrides.
42
- .custom-file {
50
+ > .custom-file {
43
51
  display: flex;
44
52
  align-items: center;
45
53
 
46
- &:not(:last-child) .custom-file-control,
47
- &:not(:last-child) .custom-file-control::before { @include border-right-radius(0); }
48
- &:not(:first-child) .custom-file-control,
49
- &:not(:first-child) .custom-file-control::before { @include border-left-radius(0); }
54
+ &:not(:last-child) .custom-file-label,
55
+ &:not(:last-child) .custom-file-label::after { @include border-right-radius(0); }
56
+ &:not(:first-child) .custom-file-label { @include border-left-radius(0); }
57
+ }
58
+
59
+ &:not(.has-validation) {
60
+ > .form-control:not(:last-child),
61
+ > .custom-select:not(:last-child),
62
+ > .custom-file:not(:last-child) .custom-file-label,
63
+ > .custom-file:not(:last-child) .custom-file-label::after {
64
+ @include border-right-radius(0);
65
+ }
66
+ }
67
+
68
+ &.has-validation {
69
+ > .form-control:nth-last-child(n + 3),
70
+ > .custom-select:nth-last-child(n + 3),
71
+ > .custom-file:nth-last-child(n + 3) .custom-file-label,
72
+ > .custom-file:nth-last-child(n + 3) .custom-file-label::after {
73
+ @include border-right-radius(0);
74
+ }
50
75
  }
51
76
  }
52
77
 
@@ -60,7 +85,6 @@
60
85
  .input-group-prepend,
61
86
  .input-group-append {
62
87
  display: flex;
63
- align-items: center;
64
88
 
65
89
  // Ensure buttons are always above inputs for more visually pleasing borders.
66
90
  // This isn't needed for `.input-group-text` since it shares the same border-color
@@ -68,6 +92,10 @@
68
92
  .btn {
69
93
  position: relative;
70
94
  z-index: 2;
95
+
96
+ &:focus {
97
+ z-index: 3;
98
+ }
71
99
  }
72
100
 
73
101
  .btn + .btn,
@@ -88,9 +116,11 @@
88
116
  // to prepend or append to an input.
89
117
 
90
118
  .input-group-text {
119
+ display: flex;
120
+ align-items: center;
91
121
  padding: $input-padding-y $input-padding-x;
92
122
  margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom
93
- font-size: $font-size-base; // Match inputs
123
+ @include font-size($input-font-size); // Match inputs
94
124
  font-weight: $font-weight-normal;
95
125
  line-height: $input-line-height;
96
126
  color: $input-group-addon-color;
@@ -113,20 +143,43 @@
113
143
  // Remix the default form control sizing classes into new ones for easier
114
144
  // manipulation.
115
145
 
146
+ .input-group-lg > .form-control:not(textarea),
147
+ .input-group-lg > .custom-select {
148
+ height: $input-height-lg;
149
+ }
150
+
116
151
  .input-group-lg > .form-control,
152
+ .input-group-lg > .custom-select,
117
153
  .input-group-lg > .input-group-prepend > .input-group-text,
118
154
  .input-group-lg > .input-group-append > .input-group-text,
119
155
  .input-group-lg > .input-group-prepend > .btn,
120
156
  .input-group-lg > .input-group-append > .btn {
121
- @extend .form-control-lg;
157
+ padding: $input-padding-y-lg $input-padding-x-lg;
158
+ @include font-size($input-font-size-lg);
159
+ line-height: $input-line-height-lg;
160
+ @include border-radius($input-border-radius-lg);
161
+ }
162
+
163
+ .input-group-sm > .form-control:not(textarea),
164
+ .input-group-sm > .custom-select {
165
+ height: $input-height-sm;
122
166
  }
123
167
 
124
168
  .input-group-sm > .form-control,
169
+ .input-group-sm > .custom-select,
125
170
  .input-group-sm > .input-group-prepend > .input-group-text,
126
171
  .input-group-sm > .input-group-append > .input-group-text,
127
172
  .input-group-sm > .input-group-prepend > .btn,
128
173
  .input-group-sm > .input-group-append > .btn {
129
- @extend .form-control-sm;
174
+ padding: $input-padding-y-sm $input-padding-x-sm;
175
+ @include font-size($input-font-size-sm);
176
+ line-height: $input-line-height-sm;
177
+ @include border-radius($input-border-radius-sm);
178
+ }
179
+
180
+ .input-group-lg > .custom-select,
181
+ .input-group-sm > .custom-select {
182
+ padding-right: $custom-select-padding-x + $custom-select-indicator-padding;
130
183
  }
131
184
 
132
185
 
@@ -139,8 +192,10 @@
139
192
 
140
193
  .input-group > .input-group-prepend > .btn,
141
194
  .input-group > .input-group-prepend > .input-group-text,
142
- .input-group > .input-group-append:not(:last-child) > .btn,
143
- .input-group > .input-group-append:not(:last-child) > .input-group-text,
195
+ .input-group:not(.has-validation) > .input-group-append:not(:last-child) > .btn,
196
+ .input-group:not(.has-validation) > .input-group-append:not(:last-child) > .input-group-text,
197
+ .input-group.has-validation > .input-group-append:nth-last-child(n + 3) > .btn,
198
+ .input-group.has-validation > .input-group-append:nth-last-child(n + 3) > .input-group-text,
144
199
  .input-group > .input-group-append:last-child > .btn:not(:last-child):not(.dropdown-toggle),
145
200
  .input-group > .input-group-append:last-child > .input-group-text:not(:last-child) {
146
201
  @include border-right-radius(0);
@@ -1,6 +1,7 @@
1
1
  .jumbotron {
2
- padding: $jumbotron-padding ($jumbotron-padding / 2);
2
+ padding: $jumbotron-padding ($jumbotron-padding * .5);
3
3
  margin-bottom: $jumbotron-padding;
4
+ color: $jumbotron-color;
4
5
  background-color: $jumbotron-bg;
5
6
  @include border-radius($border-radius-lg);
6
7