bootstrap 4.0.0.alpha4 → 4.0.0.alpha5

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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/assets/javascripts/bootstrap.js +1625 -1768
  4. data/assets/javascripts/bootstrap.min.js +3 -3
  5. data/assets/javascripts/bootstrap/alert.js +83 -96
  6. data/assets/javascripts/bootstrap/button.js +61 -68
  7. data/assets/javascripts/bootstrap/carousel.js +250 -270
  8. data/assets/javascripts/bootstrap/collapse.js +176 -190
  9. data/assets/javascripts/bootstrap/dropdown.js +143 -155
  10. data/assets/javascripts/bootstrap/modal.js +286 -310
  11. data/assets/javascripts/bootstrap/popover.js +61 -69
  12. data/assets/javascripts/bootstrap/scrollspy.js +145 -157
  13. data/assets/javascripts/bootstrap/tab.js +122 -132
  14. data/assets/javascripts/bootstrap/tooltip.js +313 -341
  15. data/assets/javascripts/bootstrap/util.js +9 -16
  16. data/assets/stylesheets/_bootstrap.scss +1 -1
  17. data/assets/stylesheets/bootstrap/_alert.scss +3 -3
  18. data/assets/stylesheets/bootstrap/_animation.scss +12 -3
  19. data/assets/stylesheets/bootstrap/_button-group.scss +1 -0
  20. data/assets/stylesheets/bootstrap/_card.scss +3 -1
  21. data/assets/stylesheets/bootstrap/_custom-forms.scss +7 -10
  22. data/assets/stylesheets/bootstrap/_dropdown.scss +1 -0
  23. data/assets/stylesheets/bootstrap/_forms.scss +16 -6
  24. data/assets/stylesheets/bootstrap/_images.scss +2 -11
  25. data/assets/stylesheets/bootstrap/_list-group.scss +2 -0
  26. data/assets/stylesheets/bootstrap/_mixins.scss +1 -1
  27. data/assets/stylesheets/bootstrap/_modal.scss +4 -2
  28. data/assets/stylesheets/bootstrap/_navbar.scss +72 -13
  29. data/assets/stylesheets/bootstrap/_normalize.scss +51 -53
  30. data/assets/stylesheets/bootstrap/_popover.scss +74 -50
  31. data/assets/stylesheets/bootstrap/_print.scss +8 -2
  32. data/assets/stylesheets/bootstrap/_reboot.scss +7 -12
  33. data/assets/stylesheets/bootstrap/_tables.scss +1 -1
  34. data/assets/stylesheets/bootstrap/_tooltip.scss +15 -12
  35. data/assets/stylesheets/bootstrap/_utilities.scss +3 -1
  36. data/assets/stylesheets/bootstrap/_variables.scss +56 -28
  37. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -1
  38. data/assets/stylesheets/bootstrap/mixins/{_pulls.scss → _float.scss} +2 -2
  39. data/assets/stylesheets/bootstrap/mixins/_forms.scss +6 -11
  40. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +8 -9
  41. data/assets/stylesheets/bootstrap/mixins/_grid.scss +31 -8
  42. data/assets/stylesheets/bootstrap/mixins/_hover.scss +1 -1
  43. data/assets/stylesheets/bootstrap/mixins/_image.scss +6 -4
  44. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +1 -1
  45. data/assets/stylesheets/bootstrap/utilities/_align.scss +6 -0
  46. data/assets/stylesheets/bootstrap/utilities/_borders.scss +30 -0
  47. data/assets/stylesheets/bootstrap/utilities/_float.scss +13 -0
  48. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +10 -9
  49. data/assets/stylesheets/bootstrap/utilities/_text.scss +8 -0
  50. data/lib/bootstrap/version.rb +2 -2
  51. data/templates/project/_bootstrap-variables.scss +55 -27
  52. metadata +6 -4
  53. data/assets/stylesheets/bootstrap/utilities/_pulls.scss +0 -13
@@ -1,13 +1,11 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * Bootstrap (v4.0.0-alpha.4): util.js
3
+ * Bootstrap (v4.0.0-alpha.5): util.js
4
4
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
5
  * --------------------------------------------------------------------------
6
6
  */
7
7
 
8
- 'use strict';
9
-
10
- var Util = (function ($) {
8
+ var Util = function ($) {
11
9
 
12
10
  /**
13
11
  * ------------------------------------------------------------------------
@@ -28,7 +26,7 @@ var Util = (function ($) {
28
26
 
29
27
  // shoutout AngusCroll (https://goo.gl/pxwQGp)
30
28
  function toType(obj) {
31
- return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
29
+ return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
32
30
  }
33
31
 
34
32
  function isElement(obj) {
@@ -55,9 +53,9 @@ var Util = (function ($) {
55
53
 
56
54
  var el = document.createElement('bootstrap');
57
55
 
58
- for (var _name in TransitionEndEvent) {
59
- if (el.style[_name] !== undefined) {
60
- return { end: TransitionEndEvent[_name] };
56
+ for (var name in TransitionEndEvent) {
57
+ if (el.style[name] !== undefined) {
58
+ return { end: TransitionEndEvent[name] };
61
59
  }
62
60
  }
63
61
 
@@ -105,12 +103,11 @@ var Util = (function ($) {
105
103
  getUID: function getUID(prefix) {
106
104
  do {
107
105
  /* eslint-disable no-bitwise */
108
- prefix += ~ ~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
106
+ prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
109
107
  /* eslint-enable no-bitwise */
110
108
  } while (document.getElementById(prefix));
111
109
  return prefix;
112
110
  },
113
-
114
111
  getSelectorFromElement: function getSelectorFromElement(element) {
115
112
  var selector = element.getAttribute('data-target');
116
113
 
@@ -121,25 +118,21 @@ var Util = (function ($) {
121
118
 
122
119
  return selector;
123
120
  },
124
-
125
121
  reflow: function reflow(element) {
126
122
  new Function('bs', 'return bs')(element.offsetHeight);
127
123
  },
128
-
129
124
  triggerTransitionEnd: function triggerTransitionEnd(element) {
130
125
  $(element).trigger(transition.end);
131
126
  },
132
-
133
127
  supportsTransitionEnd: function supportsTransitionEnd() {
134
128
  return Boolean(transition);
135
129
  },
136
-
137
130
  typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
138
131
  for (var property in configTypes) {
139
132
  if (configTypes.hasOwnProperty(property)) {
140
133
  var expectedTypes = configTypes[property];
141
134
  var value = config[property];
142
- var valueType = undefined;
135
+ var valueType = void 0;
143
136
 
144
137
  if (value && isElement(value)) {
145
138
  valueType = 'element';
@@ -158,4 +151,4 @@ var Util = (function ($) {
158
151
  setTransitionEndSupport();
159
152
 
160
153
  return Util;
161
- })(jQuery);
154
+ }(jQuery);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap v4.0.0-alpha.4 (http://getbootstrap.com)
2
+ * Bootstrap v4.0.0-alpha.5 (https://getbootstrap.com)
3
3
  * Copyright 2011-2016 The Bootstrap Authors
4
4
  * Copyright 2011-2016 Twitter, Inc.
5
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
@@ -3,7 +3,7 @@
3
3
  //
4
4
 
5
5
  .alert {
6
- padding: $alert-padding;
6
+ padding: $alert-padding-y $alert-padding-x;
7
7
  margin-bottom: $spacer-y;
8
8
  border: $alert-border-width solid transparent;
9
9
  @include border-radius($alert-border-radius);
@@ -26,13 +26,13 @@
26
26
  // Expand the right padding and account for the close button's positioning.
27
27
 
28
28
  .alert-dismissible {
29
- padding-right: ($alert-padding * 2);
29
+ padding-right: ($alert-padding-x * 2);
30
30
 
31
31
  // Adjust close link position
32
32
  .close {
33
33
  position: relative;
34
34
  top: -.125rem;
35
- right: -$alert-padding;
35
+ right: -$alert-padding-x;
36
36
  color: inherit;
37
37
  }
38
38
  }
@@ -9,12 +9,21 @@
9
9
 
10
10
  .collapse {
11
11
  display: none;
12
-
13
12
  &.in {
14
13
  display: block;
15
14
  }
16
- // tr&.in { display: table-row; }
17
- // tbody&.in { display: table-row-group; }
15
+ }
16
+
17
+ tr {
18
+ &.collapse.in {
19
+ display: table-row;
20
+ }
21
+ }
22
+
23
+ tbody {
24
+ &.collapse.in {
25
+ display: table-row-group;
26
+ }
18
27
  }
19
28
 
20
29
  .collapsing {
@@ -10,6 +10,7 @@
10
10
  > .btn {
11
11
  position: relative;
12
12
  float: left;
13
+ margin-bottom: 0;
13
14
 
14
15
  // Bring the "active" button to the front
15
16
  &:focus,
@@ -70,6 +70,7 @@
70
70
  .card-header {
71
71
  @include clearfix;
72
72
  padding: $card-spacer-y $card-spacer-x;
73
+ margin-bottom: 0; // Removes the default margin-bottom of <hN>
73
74
  background-color: $card-cap-bg;
74
75
  border-bottom: $card-border-width solid $card-border-color;
75
76
 
@@ -168,7 +169,7 @@
168
169
  // Card image
169
170
  .card-img {
170
171
  // margin: -1.325rem;
171
- @include border-radius(.25rem);
172
+ @include border-radius($card-border-radius-inner);
172
173
  }
173
174
  .card-img-overlay {
174
175
  position: absolute;
@@ -314,6 +315,7 @@
314
315
  column-gap: $card-columns-sm-up-column-gap;
315
316
 
316
317
  .card {
318
+ display: inline-block; // Don't let them vertically span multiple columns
317
319
  width: 100%; // Don't let them exceed the column width
318
320
  }
319
321
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  // Embedded icons from Open Iconic.
4
4
  // Released under MIT and copyright 2014 Waybury.
5
- // http://useiconic.com/open
5
+ // https://useiconic.com/open
6
6
 
7
7
 
8
8
  // Checkboxes and radios
@@ -11,7 +11,7 @@
11
11
 
12
12
  .custom-control {
13
13
  position: relative;
14
- display: inline;
14
+ display: inline-block;
15
15
  padding-left: $custom-control-gutter;
16
16
  cursor: pointer;
17
17
 
@@ -61,7 +61,7 @@
61
61
 
62
62
  .custom-control-indicator {
63
63
  position: absolute;
64
- top: .0625rem;
64
+ top: .25rem;
65
65
  left: 0;
66
66
  display: block;
67
67
  width: $custom-control-indicator-size;
@@ -117,13 +117,8 @@
117
117
 
118
118
  .custom-controls-stacked {
119
119
  .custom-control {
120
- display: inline;
121
-
122
- &::after {
123
- display: block;
124
- margin-bottom: $custom-control-spacer-y;
125
- content: "";
126
- }
120
+ float: left;
121
+ clear: left;
127
122
 
128
123
  + .custom-control {
129
124
  margin-left: 0;
@@ -142,6 +137,8 @@
142
137
  .custom-select {
143
138
  display: inline-block;
144
139
  max-width: 100%;
140
+ $select-border-width: ($border-width * 2);
141
+ height: calc(#{$input-height} - #{$select-border-width});
145
142
  padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
146
143
  padding-right: $custom-select-padding-x \9;
147
144
  color: $custom-select-color;
@@ -141,6 +141,7 @@
141
141
  .dropdown-header {
142
142
  display: block;
143
143
  padding: $dropdown-padding-y $dropdown-item-padding-x;
144
+ margin-bottom: 0; // for use with heading elements
144
145
  font-size: $font-size-sm;
145
146
  color: $dropdown-header-color;
146
147
  white-space: nowrap; // as with > li > a
@@ -18,8 +18,16 @@
18
18
  background-image: none;
19
19
  background-clip: padding-box;
20
20
  border: $input-btn-border-width solid $input-border-color;
21
+
21
22
  // Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
22
- @include border-radius($input-border-radius);
23
+ @if $enable-rounded {
24
+ // Manually use the if/else instead of the mixin to account for iOS override
25
+ border-radius: $input-border-radius;
26
+ } @else {
27
+ // Otherwise undo the iOS default
28
+ border-radius: 0;
29
+ }
30
+
23
31
  @include box-shadow($input-box-shadow);
24
32
  @include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s);
25
33
 
@@ -58,7 +66,8 @@
58
66
 
59
67
  select.form-control {
60
68
  &:not([size]):not([multiple]) {
61
- height: $input-height;
69
+ $select-border-width: ($border-width * 2);
70
+ height: calc(#{$input-height} - #{$select-border-width});
62
71
  }
63
72
 
64
73
  &:focus::-ms-value {
@@ -124,12 +133,11 @@ select.form-control {
124
133
  // horizontal form layout.
125
134
 
126
135
  .form-control-static {
127
- min-height: $input-height;
128
- // Size it appropriately next to real form controls
129
136
  padding-top: $input-padding-y;
130
137
  padding-bottom: $input-padding-y;
131
- // Remove default margin from `p`
132
- margin-bottom: 0;
138
+ line-height: $input-line-height;
139
+ border: solid transparent;
140
+ border-width: 1px 0;
133
141
 
134
142
  &.form-control-sm,
135
143
  &.form-control-lg {
@@ -239,6 +247,7 @@ select.form-control-lg {
239
247
  }
240
248
 
241
249
  &.disabled {
250
+ color: $text-muted;
242
251
  cursor: $cursor-disabled;
243
252
  }
244
253
  }
@@ -321,6 +330,7 @@ select.form-control-lg {
321
330
 
322
331
  .input-group {
323
332
  display: inline-table;
333
+ width: auto;
324
334
  vertical-align: middle;
325
335
 
326
336
  .input-group-addon,
@@ -6,13 +6,9 @@
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
- // Rounded corners
13
- .img-rounded {
14
- @include border-radius($border-radius-lg);
15
- }
16
12
 
17
13
  // Image thumbnails
18
14
  .img-thumbnail {
@@ -24,12 +20,7 @@
24
20
  @include box-shadow($thumbnail-box-shadow);
25
21
 
26
22
  // Keep them at most 100% wide
27
- @include img-fluid(inline-block);
28
- }
29
-
30
- // Perfect circle
31
- .img-circle {
32
- border-radius: 50%;
23
+ @include img-fluid;
33
24
  }
34
25
 
35
26
  //
@@ -70,6 +70,8 @@
70
70
 
71
71
  .list-group-flush {
72
72
  .list-group-item {
73
+ border-right: 0;
74
+ border-left: 0;
73
75
  border-radius: 0;
74
76
  }
75
77
  }
@@ -51,4 +51,4 @@
51
51
  // @import "mixins/navbar-align";
52
52
  @import "mixins/grid-framework";
53
53
  @import "mixins/grid";
54
- @import "mixins/pulls";
54
+ @import "mixins/float";
@@ -1,7 +1,7 @@
1
1
  // .modal-open - body class for killing the scroll
2
2
  // .modal - container to scroll within
3
3
  // .modal-dialog - positioning shell for the actual modal
4
- // .modal-content - actual modal w/ bg and corners and shit
4
+ // .modal-content - actual modal w/ bg and corners and stuff
5
5
 
6
6
 
7
7
  // Kill the scroll on the body
@@ -22,7 +22,9 @@
22
22
  // Prevent Chrome on Windows from adding a focus outline. For details, see
23
23
  // https://github.com/twbs/bootstrap/pull/10951.
24
24
  outline: 0;
25
- -webkit-overflow-scrolling: touch;
25
+ // We deliberately don't use `-webkit-overflow-scrolling: touch;` due to a
26
+ // gnarly iOS Safari bug: https://bugs.webkit.org/show_bug.cgi?id=158342
27
+ // See also https://github.com/twbs/bootstrap/issues/17695
26
28
 
27
29
  // When fading in the modal, animate it to slide down
28
30
  &.fade .modal-dialog {
@@ -69,26 +69,23 @@
69
69
 
70
70
  .navbar-brand {
71
71
  float: left;
72
- padding-top: $navbar-brand-padding-y;
72
+ padding-top: $navbar-brand-padding-y;
73
73
  padding-bottom: $navbar-brand-padding-y;
74
74
  margin-right: 1rem;
75
75
  font-size: $font-size-lg;
76
+ line-height: inherit;
76
77
 
77
78
  @include hover-focus {
78
79
  text-decoration: none;
79
80
  }
80
-
81
- > img {
82
- display: block;
83
- }
84
81
  }
85
82
 
86
83
 
87
84
  .navbar-divider {
88
85
  float: left;
89
86
  width: $border-width;
90
- padding-top: .425rem;
91
- padding-bottom: .425rem;
87
+ padding-top: $navbar-divider-padding-y;
88
+ padding-bottom: $navbar-divider-padding-y;
92
89
  margin-right: $navbar-padding-x;
93
90
  margin-left: $navbar-padding-x;
94
91
  overflow: hidden;
@@ -99,24 +96,74 @@
99
96
  }
100
97
 
101
98
 
99
+ // Navbar text
100
+ //
101
+ //
102
+
103
+ .navbar-text {
104
+ display: inline-block;
105
+ padding-top: .425rem;
106
+ padding-bottom: .425rem;
107
+ }
108
+
109
+
102
110
  // Navbar toggle
103
111
  //
104
112
  // Custom button for toggling the `.navbar-collapse`, powered by the collapse
105
113
  // Bootstrap JavaScript plugin.
106
114
 
107
115
  .navbar-toggler {
108
- padding: .5rem .75rem;
109
- font-size: $font-size-lg;
116
+ width: 2.5em;
117
+ height: 2em;
118
+ padding: $navbar-toggler-padding-y $navbar-toggler-padding-x;
119
+ font-size: $navbar-toggler-font-size;
110
120
  line-height: 1;
111
- background: none;
121
+ background: transparent no-repeat center center;
122
+ background-size: 24px 24px;
112
123
  border: $border-width solid transparent;
113
- @include border-radius($btn-border-radius);
124
+ @include border-radius($navbar-toggler-border-radius);
114
125
 
115
126
  @include hover-focus {
116
127
  text-decoration: none;
117
128
  }
118
129
  }
119
130
 
131
+ // scss-lint:disable ImportantRule
132
+ .navbar-toggleable {
133
+ @each $breakpoint in map-keys($grid-breakpoints) {
134
+ $next: breakpoint-next($breakpoint, $grid-breakpoints);
135
+
136
+ &-#{$breakpoint} {
137
+ @include clearfix;
138
+
139
+ @include media-breakpoint-down($breakpoint) {
140
+ .navbar-brand {
141
+ display: block;
142
+ float: none;
143
+ margin-top: .5rem;
144
+ margin-right: 0;
145
+ }
146
+
147
+ .navbar-nav {
148
+ margin-top: .5rem;
149
+ margin-bottom: .5rem;
150
+
151
+ .dropdown-menu {
152
+ position: static;
153
+ float: none;
154
+ }
155
+ }
156
+ }
157
+
158
+ @include media-breakpoint-up($next) {
159
+ display: block;
160
+ }
161
+ }
162
+ }
163
+ }
164
+ // scss-lint:enable ImportantRule
165
+
166
+
120
167
  // Navigation
121
168
  //
122
169
  // Custom navbar navigation built on the base `.nav` styles.
@@ -143,7 +190,8 @@
143
190
 
144
191
  // Dark links against a light background
145
192
  .navbar-light {
146
- .navbar-brand {
193
+ .navbar-brand,
194
+ .navbar-toggler {
147
195
  color: $navbar-light-active-color;
148
196
 
149
197
  @include hover-focus {
@@ -170,6 +218,11 @@
170
218
  }
171
219
  }
172
220
 
221
+ .navbar-toggler {
222
+ background-image: $navbar-light-toggler-bg;
223
+ border-color: $navbar-light-toggler-border;
224
+ }
225
+
173
226
  .navbar-divider {
174
227
  background-color: rgba(0,0,0,.075);
175
228
  }
@@ -177,7 +230,8 @@
177
230
 
178
231
  // White links against a dark background
179
232
  .navbar-dark {
180
- .navbar-brand {
233
+ .navbar-brand,
234
+ .navbar-toggler {
181
235
  color: $navbar-dark-active-color;
182
236
 
183
237
  @include hover-focus {
@@ -204,6 +258,11 @@
204
258
  }
205
259
  }
206
260
 
261
+ .navbar-toggler {
262
+ background-image: $navbar-dark-toggler-bg;
263
+ border-color: $navbar-dark-toggler-border;
264
+ }
265
+
207
266
  .navbar-divider {
208
267
  background-color: rgba(255,255,255,.075);
209
268
  }