bootstrap 4.0.0 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bootstrap might be problematic. Click here for more details.

Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +1 -1
  4. data/Rakefile +2 -0
  5. data/assets/javascripts/bootstrap-sprockets.js +6 -6
  6. data/assets/javascripts/bootstrap.js +3075 -3044
  7. data/assets/javascripts/bootstrap.min.js +2 -2
  8. data/assets/javascripts/bootstrap/alert.js +5 -5
  9. data/assets/javascripts/bootstrap/button.js +2 -2
  10. data/assets/javascripts/bootstrap/carousel.js +13 -11
  11. data/assets/javascripts/bootstrap/collapse.js +11 -19
  12. data/assets/javascripts/bootstrap/dropdown.js +34 -16
  13. data/assets/javascripts/bootstrap/modal.js +27 -24
  14. data/assets/javascripts/bootstrap/popover.js +7 -5
  15. data/assets/javascripts/bootstrap/scrollspy.js +6 -4
  16. data/assets/javascripts/bootstrap/tab.js +5 -5
  17. data/assets/javascripts/bootstrap/tooltip.js +15 -12
  18. data/assets/javascripts/bootstrap/util.js +28 -35
  19. data/assets/stylesheets/_bootstrap-grid.scss +1 -1
  20. data/assets/stylesheets/_bootstrap-reboot.scss +1 -1
  21. data/assets/stylesheets/_bootstrap.scss +1 -1
  22. data/assets/stylesheets/bootstrap/_breadcrumb.scss +9 -6
  23. data/assets/stylesheets/bootstrap/_button-group.scss +7 -1
  24. data/assets/stylesheets/bootstrap/_buttons.scss +1 -0
  25. data/assets/stylesheets/bootstrap/_card.scss +33 -2
  26. data/assets/stylesheets/bootstrap/_carousel.scss +48 -4
  27. data/assets/stylesheets/bootstrap/_custom-forms.scss +126 -3
  28. data/assets/stylesheets/bootstrap/_dropdown.scss +36 -1
  29. data/assets/stylesheets/bootstrap/_forms.scss +3 -1
  30. data/assets/stylesheets/bootstrap/_functions.scss +1 -1
  31. data/assets/stylesheets/bootstrap/_input-group.scss +2 -2
  32. data/assets/stylesheets/bootstrap/_mixins.scss +0 -1
  33. data/assets/stylesheets/bootstrap/_modal.scss +2 -2
  34. data/assets/stylesheets/bootstrap/_navbar.scss +0 -12
  35. data/assets/stylesheets/bootstrap/_pagination.scss +2 -1
  36. data/assets/stylesheets/bootstrap/_print.scss +6 -6
  37. data/assets/stylesheets/bootstrap/_progress.scss +1 -0
  38. data/assets/stylesheets/bootstrap/_reboot.scss +3 -3
  39. data/assets/stylesheets/bootstrap/_tables.scss +11 -3
  40. data/assets/stylesheets/bootstrap/_transitions.scss +4 -18
  41. data/assets/stylesheets/bootstrap/_utilities.scss +1 -0
  42. data/assets/stylesheets/bootstrap/_variables.scss +75 -41
  43. data/assets/stylesheets/bootstrap/mixins/_caret.scss +1 -0
  44. data/assets/stylesheets/bootstrap/mixins/_forms.scss +1 -1
  45. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +7 -7
  46. data/assets/stylesheets/bootstrap/mixins/_hover.scss +1 -3
  47. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
  48. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -2
  49. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +1 -3
  50. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +2 -0
  51. data/assets/stylesheets/bootstrap/mixins/_transition.scss +4 -0
  52. data/assets/stylesheets/bootstrap/utilities/_flex.scss +5 -0
  53. data/assets/stylesheets/bootstrap/utilities/_position.scss +1 -0
  54. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +6 -0
  55. data/assets/stylesheets/bootstrap/utilities/_text.scss +7 -1
  56. data/lib/bootstrap/version.rb +2 -2
  57. metadata +3 -3
  58. data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +0 -10
@@ -1,4 +1,13 @@
1
- // Wrapper for the slide container and indicators
1
+ // Notes on the classes:
2
+ //
3
+ // 1. The .carousel-item-left and .carousel-item-right is used to indicate where
4
+ // the active slide is heading.
5
+ // 2. .active.carousel-item is the current slide.
6
+ // 3. .active.carousel-item-left and .active.carousel-item-right is the current
7
+ // slide in its in-transition state. Only one of these occurs at a time.
8
+ // 4. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right
9
+ // is the upcoming slide in transition.
10
+
2
11
  .carousel {
3
12
  position: relative;
4
13
  }
@@ -31,7 +40,6 @@
31
40
  top: 0;
32
41
  }
33
42
 
34
- // CSS3 transforms when supported by the browser
35
43
  .carousel-item-next.carousel-item-left,
36
44
  .carousel-item-prev.carousel-item-right {
37
45
  transform: translateX(0);
@@ -60,6 +68,42 @@
60
68
  }
61
69
 
62
70
 
71
+ //
72
+ // Alternate transitions
73
+ //
74
+
75
+ .carousel-fade {
76
+ .carousel-item {
77
+ opacity: 0;
78
+ transition-duration: .6s;
79
+ transition-property: opacity;
80
+ }
81
+
82
+ .carousel-item.active,
83
+ .carousel-item-next.carousel-item-left,
84
+ .carousel-item-prev.carousel-item-right {
85
+ opacity: 1;
86
+ }
87
+
88
+ .active.carousel-item-left,
89
+ .active.carousel-item-right {
90
+ opacity: 0;
91
+ }
92
+
93
+ .carousel-item-next,
94
+ .carousel-item-prev,
95
+ .carousel-item.active,
96
+ .active.carousel-item-left,
97
+ .active.carousel-item-prev {
98
+ transform: translateX(0);
99
+
100
+ @supports (transform-style: preserve-3d) {
101
+ transform: translate3d(0, 0, 0);
102
+ }
103
+ }
104
+ }
105
+
106
+
63
107
  //
64
108
  // Left/right controls for nav
65
109
  //
@@ -91,13 +135,13 @@
91
135
  .carousel-control-prev {
92
136
  left: 0;
93
137
  @if $enable-gradients {
94
- background: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .001));
138
+ background: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
95
139
  }
96
140
  }
97
141
  .carousel-control-next {
98
142
  right: 0;
99
143
  @if $enable-gradients {
100
- background: linear-gradient(270deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .001));
144
+ background: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
101
145
  }
102
146
  }
103
147
 
@@ -157,7 +157,7 @@
157
157
  // Select
158
158
  //
159
159
  // Replaces the browser default select with a custom one, mostly pulled from
160
- // http://primercss.io.
160
+ // https://primer.github.io/.
161
161
  //
162
162
 
163
163
  .custom-select {
@@ -247,11 +247,11 @@
247
247
  margin: 0;
248
248
  opacity: 0;
249
249
 
250
- &:focus ~ .custom-file-control {
250
+ &:focus ~ .custom-file-label {
251
251
  border-color: $custom-file-focus-border-color;
252
252
  box-shadow: $custom-file-focus-box-shadow;
253
253
 
254
- &::before {
254
+ &::after {
255
255
  border-color: $custom-file-focus-border-color;
256
256
  }
257
257
  }
@@ -295,3 +295,126 @@
295
295
  @include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
296
296
  }
297
297
  }
298
+
299
+ // Range
300
+ //
301
+ // Style range inputs the same across browsers. Vendor-specific rules for psuedo
302
+ // elements cannot be mixed. As such, there are no shared styles for focus or
303
+ // active states on prefixed selectors.
304
+
305
+ .custom-range {
306
+ width: 100%;
307
+ padding-left: 0; // Firefox specific
308
+ background-color: transparent;
309
+ appearance: none;
310
+
311
+ &:focus {
312
+ outline: none;
313
+ }
314
+
315
+ &::-moz-focus-outer {
316
+ border: 0;
317
+ }
318
+
319
+ &::-webkit-slider-thumb {
320
+ width: $custom-range-thumb-width;
321
+ height: $custom-range-thumb-height;
322
+ margin-top: -($custom-range-thumb-width * .25); // Webkit specific?
323
+ @include gradient-bg($custom-range-thumb-bg);
324
+ border: $custom-range-thumb-border;
325
+ @include border-radius($custom-range-thumb-border-radius);
326
+ @include box-shadow($custom-range-thumb-box-shadow);
327
+ appearance: none;
328
+
329
+ &:focus {
330
+ outline: none;
331
+ box-shadow: $custom-range-thumb-focus-box-shadow; // No mixin for focus accessibility
332
+ }
333
+
334
+ &:active {
335
+ @include gradient-bg($custom-range-thumb-active-bg);
336
+ }
337
+ }
338
+
339
+ &::-webkit-slider-runnable-track {
340
+ width: $custom-range-track-width;
341
+ height: $custom-range-track-height;
342
+ color: transparent; // Why?
343
+ cursor: $custom-range-track-cursor;
344
+ background-color: $custom-range-track-bg;
345
+ border-color: transparent;
346
+ @include border-radius($custom-range-track-border-radius);
347
+ @include box-shadow($custom-range-track-box-shadow);
348
+ }
349
+
350
+ &::-moz-range-thumb {
351
+ width: $custom-range-thumb-width;
352
+ height: $custom-range-thumb-height;
353
+ @include gradient-bg($custom-range-thumb-bg);
354
+ border: $custom-range-thumb-border;
355
+ @include border-radius($custom-range-thumb-border-radius);
356
+ @include box-shadow($custom-range-thumb-box-shadow);
357
+ appearance: none;
358
+
359
+ &:focus {
360
+ outline: none;
361
+ box-shadow: $custom-range-thumb-focus-box-shadow; // No mixin for focus accessibility
362
+ }
363
+
364
+ &:active {
365
+ @include gradient-bg($custom-range-thumb-active-bg);
366
+ }
367
+ }
368
+
369
+ &::-moz-range-track {
370
+ width: $custom-range-track-width;
371
+ height: $custom-range-track-height;
372
+ color: transparent;
373
+ cursor: $custom-range-track-cursor;
374
+ background-color: $custom-range-track-bg;
375
+ border-color: transparent; // Firefox specific?
376
+ @include border-radius($custom-range-track-border-radius);
377
+ @include box-shadow($custom-range-track-box-shadow);
378
+ }
379
+
380
+ &::-ms-thumb {
381
+ width: $custom-range-thumb-width;
382
+ height: $custom-range-thumb-height;
383
+ @include gradient-bg($custom-range-thumb-bg);
384
+ border: $custom-range-thumb-border;
385
+ @include border-radius($custom-range-thumb-border-radius);
386
+ @include box-shadow($custom-range-thumb-box-shadow);
387
+ appearance: none;
388
+
389
+ &:focus {
390
+ outline: none;
391
+ box-shadow: $custom-range-thumb-focus-box-shadow; // No mixin for focus accessibility
392
+ }
393
+
394
+ &:active {
395
+ @include gradient-bg($custom-range-thumb-active-bg);
396
+ }
397
+ }
398
+
399
+ &::-ms-track {
400
+ width: $custom-range-track-width;
401
+ height: $custom-range-track-height;
402
+ color: transparent;
403
+ cursor: $custom-range-track-cursor;
404
+ background-color: transparent;
405
+ border-color: transparent;
406
+ border-width: ($custom-range-thumb-height * .5);
407
+ @include box-shadow($custom-range-track-box-shadow);
408
+ }
409
+
410
+ &::-ms-fill-lower {
411
+ background-color: $custom-range-track-bg;
412
+ @include border-radius($custom-range-track-border-radius);
413
+ }
414
+
415
+ &::-ms-fill-upper {
416
+ margin-right: 15px; // arbitrary?
417
+ background-color: $custom-range-track-bg;
418
+ @include border-radius($custom-range-track-border-radius);
419
+ }
420
+ }
@@ -1,6 +1,8 @@
1
1
  // The dropdown wrapper (`<div>`)
2
2
  .dropup,
3
- .dropdown {
3
+ .dropright,
4
+ .dropdown,
5
+ .dropleft {
4
6
  position: relative;
5
7
  }
6
8
 
@@ -31,10 +33,17 @@
31
33
  @include box-shadow($dropdown-box-shadow);
32
34
  }
33
35
 
36
+ .dropdown-menu-right {
37
+ right: 0;
38
+ left: auto;
39
+ }
40
+
34
41
  // Allow for dropdowns to go bottom up (aka, dropup-menu)
35
42
  // Just add .dropup after the standard .dropdown class and you're set.
36
43
  .dropup {
37
44
  .dropdown-menu {
45
+ top: auto;
46
+ bottom: 100%;
38
47
  margin-top: 0;
39
48
  margin-bottom: $dropdown-spacer;
40
49
  }
@@ -46,6 +55,9 @@
46
55
 
47
56
  .dropright {
48
57
  .dropdown-menu {
58
+ top: 0;
59
+ right: auto;
60
+ left: 100%;
49
61
  margin-top: 0;
50
62
  margin-left: $dropdown-spacer;
51
63
  }
@@ -60,6 +72,9 @@
60
72
 
61
73
  .dropleft {
62
74
  .dropdown-menu {
75
+ top: 0;
76
+ right: 100%;
77
+ left: auto;
63
78
  margin-top: 0;
64
79
  margin-right: $dropdown-spacer;
65
80
  }
@@ -72,6 +87,19 @@
72
87
  }
73
88
  }
74
89
 
90
+ // When enabled Popper.js, reset basic dropdown position
91
+ // stylelint-disable no-duplicate-selectors
92
+ .dropdown-menu {
93
+ &[x-placement^="top"],
94
+ &[x-placement^="right"],
95
+ &[x-placement^="bottom"],
96
+ &[x-placement^="left"] {
97
+ right: auto;
98
+ bottom: auto;
99
+ }
100
+ }
101
+ // stylelint-enable no-duplicate-selectors
102
+
75
103
  // Dividers (basically an `<hr>`) within the dropdown
76
104
  .dropdown-divider {
77
105
  @include nav-divider($dropdown-divider-bg);
@@ -129,3 +157,10 @@
129
157
  color: $dropdown-header-color;
130
158
  white-space: nowrap; // as with > li > a
131
159
  }
160
+
161
+ // Dropdown text
162
+ .dropdown-item-text {
163
+ display: block;
164
+ padding: $dropdown-item-padding-y $dropdown-item-padding-x;
165
+ color: $dropdown-link-color;
166
+ }
@@ -121,6 +121,7 @@ select.form-control {
121
121
  padding-bottom: $input-padding-y;
122
122
  margin-bottom: 0; // match inputs if this class comes on inputs with default margins
123
123
  line-height: $input-line-height;
124
+ color: $input-plaintext-color;
124
125
  background-color: transparent;
125
126
  border: solid transparent;
126
127
  border-width: $input-border-width 0;
@@ -302,7 +303,8 @@ select.form-control-lg {
302
303
  display: inline-block;
303
304
  }
304
305
 
305
- .input-group {
306
+ .input-group,
307
+ .custom-select {
306
308
  width: auto;
307
309
  }
308
310
 
@@ -79,7 +79,7 @@
79
79
  // Request a theme color level
80
80
  @function theme-color-level($color-name: "primary", $level: 0) {
81
81
  $color: theme-color($color-name);
82
- $color-base: if($level > 0, #000, #fff);
82
+ $color-base: if($level > 0, $black, $white);
83
83
  $level: abs($level);
84
84
 
85
85
  @return mix($color-base, $color, $level * $theme-color-interval);
@@ -46,9 +46,9 @@
46
46
  align-items: center;
47
47
 
48
48
  &:not(:last-child) .custom-file-label,
49
- &:not(:last-child) .custom-file-label::before { @include border-right-radius(0); }
49
+ &:not(:last-child) .custom-file-label::after { @include border-right-radius(0); }
50
50
  &:not(:first-child) .custom-file-label,
51
- &:not(:first-child) .custom-file-label::before { @include border-left-radius(0); }
51
+ &:not(:first-child) .custom-file-label::after { @include border-left-radius(0); }
52
52
  }
53
53
  }
54
54
 
@@ -36,7 +36,6 @@
36
36
 
37
37
  // // Layout
38
38
  @import "mixins/clearfix";
39
- // @import "mixins/navbar-align";
40
39
  @import "mixins/grid-framework";
41
40
  @import "mixins/grid";
42
41
  @import "mixins/float";
@@ -67,7 +67,7 @@
67
67
  background-color: $modal-content-bg;
68
68
  background-clip: padding-box;
69
69
  border: $modal-content-border-width solid $modal-content-border-color;
70
- @include border-radius($border-radius-lg);
70
+ @include border-radius($modal-content-border-radius);
71
71
  @include box-shadow($modal-content-box-shadow-xs);
72
72
  // Remove focus outline from opened modal
73
73
  outline: 0;
@@ -96,7 +96,7 @@
96
96
  justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
97
97
  padding: $modal-header-padding;
98
98
  border-bottom: $modal-header-border-width solid $modal-header-border-color;
99
- @include border-top-radius($border-radius-lg);
99
+ @include border-top-radius($modal-content-border-radius);
100
100
 
101
101
  .close {
102
102
  padding: $modal-header-padding;
@@ -162,11 +162,6 @@
162
162
  position: absolute;
163
163
  }
164
164
 
165
- .dropdown-menu-right {
166
- right: 0;
167
- left: auto; // Reset the default from `.dropdown-menu`
168
- }
169
-
170
165
  .nav-link {
171
166
  padding-right: $navbar-nav-link-padding-x;
172
167
  padding-left: $navbar-nav-link-padding-x;
@@ -189,13 +184,6 @@
189
184
  .navbar-toggler {
190
185
  display: none;
191
186
  }
192
-
193
- .dropup {
194
- .dropdown-menu {
195
- top: auto;
196
- bottom: 100%;
197
- }
198
- }
199
187
  }
200
188
  }
201
189
  }
@@ -15,6 +15,7 @@
15
15
  border: $pagination-border-width solid $pagination-border-color;
16
16
 
17
17
  &:hover {
18
+ z-index: 2;
18
19
  color: $pagination-hover-color;
19
20
  text-decoration: none;
20
21
  background-color: $pagination-hover-bg;
@@ -23,7 +24,7 @@
23
24
 
24
25
  &:focus {
25
26
  z-index: 2;
26
- outline: 0;
27
+ outline: $pagination-focus-outline;
27
28
  box-shadow: $pagination-focus-box-shadow;
28
29
  }
29
30
 
@@ -5,7 +5,7 @@
5
5
  // ==========================================================================
6
6
  // Print styles.
7
7
  // Inlined to avoid the additional HTTP request:
8
- // http://www.phpied.com/delay-loading-your-print-css/
8
+ // https://www.phpied.com/delay-loading-your-print-css/
9
9
  // ==========================================================================
10
10
 
11
11
  @if $enable-print-styles {
@@ -14,7 +14,7 @@
14
14
  *::before,
15
15
  *::after {
16
16
  // Bootstrap specific; comment out `color` and `background`
17
- //color: #000 !important; // Black prints faster: http://www.sanbeiji.com/archives/953
17
+ //color: $black !important; // Black prints faster
18
18
  text-shadow: none !important;
19
19
  //background: transparent !important;
20
20
  box-shadow: none !important;
@@ -51,7 +51,7 @@
51
51
  }
52
52
  pre,
53
53
  blockquote {
54
- border: $border-width solid #999; // Bootstrap custom code; using `$border-width` instead of 1px
54
+ border: $border-width solid $gray-500; // Bootstrap custom code; using `$border-width` instead of 1px
55
55
  page-break-inside: avoid;
56
56
  }
57
57
 
@@ -101,7 +101,7 @@
101
101
  display: none;
102
102
  }
103
103
  .badge {
104
- border: $border-width solid #000;
104
+ border: $border-width solid $black;
105
105
  }
106
106
 
107
107
  .table {
@@ -109,13 +109,13 @@
109
109
 
110
110
  td,
111
111
  th {
112
- background-color: #fff !important;
112
+ background-color: $white !important;
113
113
  }
114
114
  }
115
115
  .table-bordered {
116
116
  th,
117
117
  td {
118
- border: 1px solid #ddd !important;
118
+ border: 1px solid $gray-300 !important;
119
119
  }
120
120
  }
121
121