bootstrap 4.0.0.alpha5 → 4.0.0.alpha6

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 (85) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -4
  3. data/assets/javascripts/bootstrap.js +312 -207
  4. data/assets/javascripts/bootstrap.min.js +4 -4
  5. data/assets/javascripts/bootstrap/alert.js +9 -5
  6. data/assets/javascripts/bootstrap/button.js +5 -5
  7. data/assets/javascripts/bootstrap/carousel.js +52 -28
  8. data/assets/javascripts/bootstrap/collapse.js +19 -11
  9. data/assets/javascripts/bootstrap/dropdown.js +21 -19
  10. data/assets/javascripts/bootstrap/modal.js +69 -43
  11. data/assets/javascripts/bootstrap/popover.js +4 -4
  12. data/assets/javascripts/bootstrap/scrollspy.js +20 -11
  13. data/assets/javascripts/bootstrap/tab.js +19 -14
  14. data/assets/javascripts/bootstrap/tooltip.js +54 -22
  15. data/assets/javascripts/bootstrap/util.js +7 -12
  16. data/assets/stylesheets/_bootstrap-grid.scss +23 -3
  17. data/assets/stylesheets/_bootstrap-reboot.scss +2 -3
  18. data/assets/stylesheets/_bootstrap.scss +6 -6
  19. data/assets/stylesheets/bootstrap/_alert.scss +3 -4
  20. data/assets/stylesheets/bootstrap/_badge.scss +77 -0
  21. data/assets/stylesheets/bootstrap/_button-group.scss +18 -51
  22. data/assets/stylesheets/bootstrap/_buttons.scss +14 -20
  23. data/assets/stylesheets/bootstrap/_card.scss +30 -76
  24. data/assets/stylesheets/bootstrap/_carousel.scss +96 -171
  25. data/assets/stylesheets/bootstrap/_close.scss +3 -3
  26. data/assets/stylesheets/bootstrap/_code.scss +7 -0
  27. data/assets/stylesheets/bootstrap/_custom-forms.scss +13 -12
  28. data/assets/stylesheets/bootstrap/_dropdown.scss +17 -36
  29. data/assets/stylesheets/bootstrap/_forms.scss +61 -47
  30. data/assets/stylesheets/bootstrap/_grid.scss +13 -0
  31. data/assets/stylesheets/bootstrap/_images.scss +2 -2
  32. data/assets/stylesheets/bootstrap/_input-group.scss +17 -27
  33. data/assets/stylesheets/bootstrap/_list-group.scss +79 -63
  34. data/assets/stylesheets/bootstrap/_media.scss +5 -78
  35. data/assets/stylesheets/bootstrap/_mixins.scss +8 -5
  36. data/assets/stylesheets/bootstrap/_modal.scss +21 -13
  37. data/assets/stylesheets/bootstrap/_nav.scss +30 -68
  38. data/assets/stylesheets/bootstrap/_navbar.scss +131 -178
  39. data/assets/stylesheets/bootstrap/_normalize.scss +133 -94
  40. data/assets/stylesheets/bootstrap/_pagination.scss +16 -22
  41. data/assets/stylesheets/bootstrap/_popover.scss +3 -3
  42. data/assets/stylesheets/bootstrap/_print.scss +5 -8
  43. data/assets/stylesheets/bootstrap/_progress.scss +14 -127
  44. data/assets/stylesheets/bootstrap/_reboot.scss +16 -15
  45. data/assets/stylesheets/bootstrap/_responsive-embed.scss +18 -5
  46. data/assets/stylesheets/bootstrap/_tables.scss +13 -56
  47. data/assets/stylesheets/bootstrap/_tooltip.scss +1 -1
  48. data/assets/stylesheets/bootstrap/{_animation.scss → _transitions.scss} +6 -8
  49. data/assets/stylesheets/bootstrap/_type.scss +5 -12
  50. data/assets/stylesheets/bootstrap/_utilities.scss +2 -0
  51. data/assets/stylesheets/bootstrap/_variables.scss +320 -216
  52. data/assets/stylesheets/bootstrap/mixins/{_tag.scss → _badge.scss} +2 -2
  53. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +25 -16
  54. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +31 -58
  55. data/assets/stylesheets/bootstrap/mixins/_cards.scss +3 -0
  56. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +1 -1
  57. data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -0
  58. data/assets/stylesheets/bootstrap/mixins/_forms.scss +3 -5
  59. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +1 -7
  60. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +19 -23
  61. data/assets/stylesheets/bootstrap/mixins/_grid.scss +19 -26
  62. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +3 -5
  63. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
  64. data/assets/stylesheets/bootstrap/mixins/_transforms.scss +14 -0
  65. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +5 -0
  66. data/assets/stylesheets/bootstrap/utilities/_align.scss +5 -5
  67. data/assets/stylesheets/bootstrap/utilities/_background.scss +1 -1
  68. data/assets/stylesheets/bootstrap/utilities/_borders.scss +10 -3
  69. data/assets/stylesheets/bootstrap/utilities/_display.scss +13 -8
  70. data/assets/stylesheets/bootstrap/utilities/_flex.scss +42 -31
  71. data/assets/stylesheets/bootstrap/utilities/_float.scss +5 -9
  72. data/assets/stylesheets/bootstrap/utilities/_position.scss +23 -0
  73. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +10 -0
  74. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +36 -37
  75. data/assets/stylesheets/bootstrap/utilities/_text.scss +14 -12
  76. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +1 -1
  77. data/lib/bootstrap/version.rb +2 -2
  78. data/tasks/updater/scss.rb +3 -5
  79. data/templates/project/_bootstrap-variables.scss +321 -217
  80. metadata +10 -10
  81. data/assets/stylesheets/_bootstrap-flex.scss +0 -8
  82. data/assets/stylesheets/bootstrap/_tags.scss +0 -77
  83. data/assets/stylesheets/bootstrap/mixins/_progress.scss +0 -23
  84. data/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -8
  85. data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -9
@@ -1,17 +1,17 @@
1
1
  .close {
2
2
  float: right;
3
- font-size: ($font-size-base * 1.5);
3
+ font-size: $close-font-size;
4
4
  font-weight: $close-font-weight;
5
5
  line-height: 1;
6
6
  color: $close-color;
7
7
  text-shadow: $close-text-shadow;
8
- opacity: .2;
8
+ opacity: .5;
9
9
 
10
10
  @include hover-focus {
11
11
  color: $close-color;
12
12
  text-decoration: none;
13
13
  cursor: pointer;
14
- opacity: .5;
14
+ opacity: .75;
15
15
  }
16
16
  }
17
17
 
@@ -13,6 +13,13 @@ code {
13
13
  color: $code-color;
14
14
  background-color: $code-bg;
15
15
  @include border-radius($border-radius);
16
+
17
+ // Streamline the style when inside anchors to avoid broken underline and more
18
+ a > & {
19
+ padding: 0;
20
+ color: inherit;
21
+ background-color: inherit;
22
+ }
16
23
  }
17
24
 
18
25
  // User input typically entered via keyboard
@@ -11,13 +11,11 @@
11
11
 
12
12
  .custom-control {
13
13
  position: relative;
14
- display: inline-block;
14
+ display: inline-flex;
15
+ min-height: (1rem * $line-height-base);
15
16
  padding-left: $custom-control-gutter;
17
+ margin-right: $custom-control-spacer-x;
16
18
  cursor: pointer;
17
-
18
- + .custom-control {
19
- margin-left: $custom-control-spacer-x;
20
- }
21
19
  }
22
20
 
23
21
  .custom-control-input {
@@ -61,7 +59,7 @@
61
59
 
62
60
  .custom-control-indicator {
63
61
  position: absolute;
64
- top: .25rem;
62
+ top: (($line-height-base - $custom-control-indicator-size) / 2);
65
63
  left: 0;
66
64
  display: block;
67
65
  width: $custom-control-indicator-size;
@@ -116,9 +114,11 @@
116
114
  // set. Use these optional classes to tweak the layout.
117
115
 
118
116
  .custom-controls-stacked {
117
+ display: flex;
118
+ flex-direction: column;
119
+
119
120
  .custom-control {
120
- float: left;
121
- clear: left;
121
+ margin-bottom: $custom-control-spacer-y;
122
122
 
123
123
  + .custom-control {
124
124
  margin-left: 0;
@@ -132,19 +132,17 @@
132
132
  // Replaces the browser default select with a custom one, mostly pulled from
133
133
  // http://primercss.io.
134
134
  //
135
- // Includes IE9-specific hacks (noted by ` \9`).
136
135
 
137
136
  .custom-select {
138
137
  display: inline-block;
139
138
  max-width: 100%;
140
139
  $select-border-width: ($border-width * 2);
141
- height: calc(#{$input-height} - #{$select-border-width});
140
+ height: calc(#{$input-height} + #{$select-border-width});
142
141
  padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
143
- padding-right: $custom-select-padding-x \9;
142
+ line-height: $custom-select-line-height;
144
143
  color: $custom-select-color;
145
144
  vertical-align: middle;
146
145
  background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center;
147
- background-image: none \9;
148
146
  background-size: $custom-select-bg-size;
149
147
  border: $custom-select-border-width solid $custom-select-border-color;
150
148
  @include border-radius($custom-select-border-radius);
@@ -201,12 +199,14 @@
201
199
  display: inline-block;
202
200
  max-width: 100%;
203
201
  height: $custom-file-height;
202
+ margin-bottom: 0;
204
203
  cursor: pointer;
205
204
  }
206
205
 
207
206
  .custom-file-input {
208
207
  min-width: $custom-file-width;
209
208
  max-width: 100%;
209
+ height: $custom-file-height;
210
210
  margin: 0;
211
211
  filter: alpha(opacity = 0);
212
212
  opacity: 0;
@@ -226,6 +226,7 @@
226
226
  padding: $custom-file-padding-x $custom-file-padding-y;
227
227
  line-height: $custom-file-line-height;
228
228
  color: $custom-file-color;
229
+ pointer-events: none;
229
230
  user-select: none;
230
231
  background-color: $custom-file-bg;
231
232
  border: $custom-file-border-width solid $custom-file-border-color;
@@ -44,7 +44,7 @@
44
44
  min-width: $dropdown-min-width;
45
45
  padding: $dropdown-padding-y 0;
46
46
  margin: $dropdown-margin-top 0 0; // override default ul
47
- font-size: $font-size-base;
47
+ font-size: $font-size-base; // Redeclare because nesting can cause inheritance issues
48
48
  color: $body-color;
49
49
  text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
50
50
  list-style: none;
@@ -68,7 +68,7 @@
68
68
  width: 100%; // For `<button>`s
69
69
  padding: 3px $dropdown-item-padding-x;
70
70
  clear: both;
71
- font-weight: normal;
71
+ font-weight: $font-weight-normal;
72
72
  color: $dropdown-link-color;
73
73
  text-align: inherit; // For `<button>`s
74
74
  white-space: nowrap; // prevent links from randomly breaking onto new lines
@@ -81,37 +81,27 @@
81
81
  background-color: $dropdown-link-hover-bg;
82
82
  }
83
83
 
84
- // Active state
85
- &.active {
86
- @include plain-hover-focus {
87
- color: $dropdown-link-active-color;
88
- text-decoration: none;
89
- background-color: $dropdown-link-active-bg;
90
- outline: 0;
91
- }
84
+ &.active,
85
+ &:active {
86
+ color: $dropdown-link-active-color;
87
+ text-decoration: none;
88
+ background-color: $dropdown-link-active-bg;
92
89
  }
93
90
 
94
- // Disabled state
95
- //
96
- // Gray out text and ensure the hover/focus state remains gray
97
- &.disabled {
98
- @include plain-hover-focus {
99
- color: $dropdown-link-disabled-color;
100
- }
101
-
102
- // Nuke hover/focus effects
103
- @include hover-focus {
104
- text-decoration: none;
105
- cursor: $cursor-disabled;
106
- background-color: transparent;
107
- background-image: none; // Remove CSS gradient
108
- @include reset-filter();
91
+ &.disabled,
92
+ &:disabled {
93
+ color: $dropdown-link-disabled-color;
94
+ cursor: $cursor-disabled;
95
+ background-color: transparent;
96
+ // Remove CSS gradients if they're enabled
97
+ @if $enable-gradients {
98
+ background-image: none;
109
99
  }
110
100
  }
111
101
  }
112
102
 
113
103
  // Open state for the dropdown
114
- .open {
104
+ .show {
115
105
  // Show the menu
116
106
  > .dropdown-menu {
117
107
  display: block;
@@ -160,17 +150,8 @@
160
150
  // Allow for dropdowns to go bottom up (aka, dropup-menu)
161
151
  //
162
152
  // Just add .dropup after the standard .dropdown class and you're set.
163
- // TODO: abstract this so that the navbar fixed styles are not placed here?
164
-
165
- .dropup,
166
- .navbar-fixed-bottom .dropdown {
167
- // Reverse the caret
168
- .caret {
169
- content: "";
170
- border-top: 0;
171
- border-bottom: $caret-width solid;
172
- }
173
153
 
154
+ .dropup {
174
155
  // Different positioning for bottom up menu
175
156
  .dropdown-menu {
176
157
  top: auto;
@@ -29,7 +29,7 @@
29
29
  }
30
30
 
31
31
  @include box-shadow($input-box-shadow);
32
- @include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s);
32
+ @include transition($input-transition);
33
33
 
34
34
  // Unstyle the caret on `<select>`s in IE10+.
35
35
  &::-ms-expand {
@@ -67,7 +67,7 @@
67
67
  select.form-control {
68
68
  &:not([size]):not([multiple]) {
69
69
  $select-border-width: ($border-width * 2);
70
- height: calc(#{$input-height} - #{$select-border-width});
70
+ height: calc(#{$input-height} + #{$select-border-width});
71
71
  }
72
72
 
73
73
  &:focus::-ms-value {
@@ -95,20 +95,20 @@ select.form-control {
95
95
  // For use with horizontal and inline forms, when you need the label text to
96
96
  // align with the form controls.
97
97
  .col-form-label {
98
- padding-top: $input-padding-y;
99
- padding-bottom: $input-padding-y;
98
+ padding-top: calc(#{$input-padding-y} - #{$input-btn-border-width} * 2);
99
+ padding-bottom: calc(#{$input-padding-y} - #{$input-btn-border-width} * 2);
100
100
  margin-bottom: 0; // Override the `<label>` default
101
101
  }
102
102
 
103
103
  .col-form-label-lg {
104
- padding-top: $input-padding-y-lg;
105
- padding-bottom: $input-padding-y-lg;
104
+ padding-top: calc(#{$input-padding-y-lg} - #{$input-btn-border-width} * 2);
105
+ padding-bottom: calc(#{$input-padding-y-lg} - #{$input-btn-border-width} * 2);
106
106
  font-size: $font-size-lg;
107
107
  }
108
108
 
109
109
  .col-form-label-sm {
110
- padding-top: $input-padding-y-sm;
111
- padding-bottom: $input-padding-y-sm;
110
+ padding-top: calc(#{$input-padding-y-sm} - #{$input-btn-border-width} * 2);
111
+ padding-bottom: calc(#{$input-padding-y-sm} - #{$input-btn-border-width} * 2);
112
112
  font-size: $font-size-sm;
113
113
  }
114
114
 
@@ -135,9 +135,10 @@ select.form-control {
135
135
  .form-control-static {
136
136
  padding-top: $input-padding-y;
137
137
  padding-bottom: $input-padding-y;
138
+ margin-bottom: 0; // match inputs if this class comes on inputs with default margins
138
139
  line-height: $input-line-height;
139
140
  border: solid transparent;
140
- border-width: 1px 0;
141
+ border-width: $input-btn-border-width 0;
141
142
 
142
143
  &.form-control-sm,
143
144
  &.form-control-lg {
@@ -191,7 +192,7 @@ select.form-control-lg {
191
192
 
192
193
  .form-text {
193
194
  display: block;
194
- margin-top: ($spacer * .25);
195
+ margin-top: $form-text-margin-top;
195
196
  }
196
197
 
197
198
 
@@ -202,12 +203,7 @@ select.form-control-lg {
202
203
  .form-check {
203
204
  position: relative;
204
205
  display: block;
205
- margin-bottom: ($spacer * .75);
206
-
207
- // Move up sibling radios or checkboxes for tighter spacing
208
- + .form-check {
209
- margin-top: -.25rem;
210
- }
206
+ margin-bottom: $form-check-margin-bottom;
211
207
 
212
208
  &.disabled {
213
209
  .form-check-label {
@@ -218,15 +214,15 @@ select.form-control-lg {
218
214
  }
219
215
 
220
216
  .form-check-label {
221
- padding-left: 1.25rem;
217
+ padding-left: $form-check-input-gutter;
222
218
  margin-bottom: 0; // Override default `<label>` bottom margin
223
219
  cursor: pointer;
224
220
  }
225
221
 
226
222
  .form-check-input {
227
223
  position: absolute;
228
- margin-top: .25rem;
229
- margin-left: -1.25rem;
224
+ margin-top: $form-check-input-margin-y;
225
+ margin-left: -$form-check-input-gutter;
230
226
 
231
227
  &:only-child {
232
228
  position: static;
@@ -235,20 +231,14 @@ select.form-control-lg {
235
231
 
236
232
  // Radios and checkboxes on same line
237
233
  .form-check-inline {
238
- position: relative;
239
234
  display: inline-block;
240
- padding-left: 1.25rem;
241
- margin-bottom: 0; // Override default `<label>` bottom margin
242
- vertical-align: middle;
243
- cursor: pointer;
244
235
 
245
- + .form-check-inline {
246
- margin-left: .75rem;
236
+ .form-check-label {
237
+ vertical-align: middle;
247
238
  }
248
239
 
249
- &.disabled {
250
- color: $text-muted;
251
- cursor: $cursor-disabled;
240
+ + .form-check-inline {
241
+ margin-left: $form-check-inline-margin-x;
252
242
  }
253
243
  }
254
244
 
@@ -258,7 +248,7 @@ select.form-control-lg {
258
248
  // Apply contextual and semantic states to individual form controls.
259
249
 
260
250
  .form-control-feedback {
261
- margin-top: ($spacer * .25);
251
+ margin-top: $form-feedback-margin-top;
262
252
  }
263
253
 
264
254
  .form-control-success,
@@ -306,14 +296,33 @@ select.form-control-lg {
306
296
  // default HTML form controls and our custom form controls (e.g., input groups).
307
297
 
308
298
  .form-inline {
299
+ display: flex;
300
+ flex-flow: row wrap;
301
+ align-items: center; // Prevent shorter elements from growing to same height as others (e.g., small buttons growing to normal sized button height)
302
+
303
+ // Because we use flex, the initial sizing of checkboxes is collapsed and
304
+ // doesn't occupy the full-width (which is what we want for xs grid tier),
305
+ // so we force that here.
306
+ .form-check {
307
+ width: 100%;
308
+ }
309
309
 
310
310
  // Kick in the inline
311
311
  @include media-breakpoint-up(sm) {
312
+ label {
313
+ display: flex;
314
+ align-items: center;
315
+ justify-content: center;
316
+ margin-bottom: 0;
317
+ }
318
+
312
319
  // Inline-block all the things for "inline"
313
320
  .form-group {
314
- display: inline-block;
321
+ display: flex;
322
+ flex: 0 0 auto;
323
+ flex-flow: row wrap;
324
+ align-items: center;
315
325
  margin-bottom: 0;
316
- vertical-align: middle;
317
326
  }
318
327
 
319
328
  // Allow folks to *not* use `.form-group`
@@ -329,20 +338,7 @@ select.form-control-lg {
329
338
  }
330
339
 
331
340
  .input-group {
332
- display: inline-table;
333
341
  width: auto;
334
- vertical-align: middle;
335
-
336
- .input-group-addon,
337
- .input-group-btn,
338
- .form-control {
339
- width: auto;
340
- }
341
- }
342
-
343
- // Input groups need that 100% width though
344
- .input-group > .form-control {
345
- width: 100%;
346
342
  }
347
343
 
348
344
  .form-control-label {
@@ -353,19 +349,37 @@ select.form-control-lg {
353
349
  // Remove default margin on radios/checkboxes that were used for stacking, and
354
350
  // then undo the floating of radios and checkboxes to match.
355
351
  .form-check {
356
- display: inline-block;
352
+ display: flex;
353
+ align-items: center;
354
+ justify-content: center;
355
+ width: auto;
357
356
  margin-top: 0;
358
357
  margin-bottom: 0;
359
- vertical-align: middle;
360
358
  }
361
359
  .form-check-label {
362
360
  padding-left: 0;
363
361
  }
364
362
  .form-check-input {
365
363
  position: relative;
364
+ margin-top: 0;
365
+ margin-right: $form-check-input-margin-x;
366
366
  margin-left: 0;
367
367
  }
368
368
 
369
+ // Custom form controls
370
+ .custom-control {
371
+ display: flex;
372
+ align-items: center;
373
+ justify-content: center;
374
+ padding-left: 0;
375
+ }
376
+ .custom-control-indicator {
377
+ position: static;
378
+ display: inline-block;
379
+ margin-right: $form-check-input-margin-x; // Flexbox alignment means we lose our HTML space here, so we compensate.
380
+ vertical-align: text-bottom;
381
+ }
382
+
369
383
  // Re-override the feedback icon.
370
384
  .has-feedback .form-control-feedback {
371
385
  top: 0;
@@ -28,6 +28,19 @@
28
28
  .row {
29
29
  @include make-row();
30
30
  }
31
+
32
+ // Remove the negative margin from default .row, then the horizontal padding
33
+ // from all immediate children columns (to prevent runaway style inheritance).
34
+ .no-gutters {
35
+ margin-right: 0;
36
+ margin-left: 0;
37
+
38
+ > .col,
39
+ > [class*="col-"] {
40
+ padding-right: 0;
41
+ padding-left: 0;
42
+ }
43
+ }
31
44
  }
32
45
 
33
46
  // Columns