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,145 +1,32 @@
1
- //
2
1
  // Progress animations
3
- //
4
-
5
2
  @keyframes progress-bar-stripes {
6
- from { background-position: $spacer-y 0; }
3
+ from { background-position: $progress-height 0; }
7
4
  to { background-position: 0 0; }
8
5
  }
9
6
 
10
-
11
- //
12
7
  // Basic progress bar
13
- //
14
-
15
8
  .progress {
16
- display: block;
17
- width: 100%;
18
- height: $spacer-y; // todo: make a new var for this
19
- margin-bottom: $spacer-y;
20
- }
21
- .progress[value] {
22
- // Set overall background
23
- background-color: $progress-bg;
24
- // Remove Firefox and Opera border
25
- border: 0;
26
- // Reset the default appearance
27
- appearance: none;
28
- // Set overall border radius
29
- @include border-radius($progress-border-radius);
30
- }
31
-
32
- // Filled-in portion of the bar
33
- .progress[value]::-ms-fill {
34
- background-color: $progress-bar-color;
35
- // Remove right-hand border of value bar from IE10+/Edge
36
- border: 0;
37
- }
38
- .progress[value]::-moz-progress-bar {
39
- background-color: $progress-bar-color;
40
- @include border-left-radius($progress-border-radius);
41
- }
42
- .progress[value]::-webkit-progress-value {
43
- background-color: $progress-bar-color;
44
- @include border-left-radius($progress-border-radius);
45
- }
46
- // Tweaks for full progress bar
47
- .progress[value="100"]::-moz-progress-bar {
48
- @include border-right-radius($progress-border-radius);
49
- }
50
- .progress[value="100"]::-webkit-progress-value {
51
- @include border-right-radius($progress-border-radius);
52
- }
53
-
54
- // Unfilled portion of the bar
55
- .progress[value]::-webkit-progress-bar {
9
+ display: flex;
10
+ overflow: hidden; // force rounded corners by cropping it
11
+ font-size: $progress-font-size;
12
+ line-height: $progress-height;
13
+ text-align: center;
56
14
  background-color: $progress-bg;
57
15
  @include border-radius($progress-border-radius);
58
- @include box-shadow($progress-box-shadow);
59
16
  }
60
- base::-moz-progress-bar, // Absurd-but-syntactically-valid selector to make these styles Firefox-only
61
- .progress[value] {
62
- background-color: $progress-bg;
63
- @include border-radius($progress-border-radius);
64
- @include box-shadow($progress-box-shadow);
65
- }
66
-
67
- // IE9 hacks to accompany custom markup. We don't need to scope this via media queries, but I feel better doing it anyway.
68
- @media screen and (min-width:0\0) {
69
- .progress {
70
- background-color: $progress-bg;
71
- @include border-radius($progress-border-radius);
72
- @include box-shadow($progress-box-shadow);
73
- }
74
- .progress-bar {
75
- display: inline-block;
76
- height: $spacer-y;
77
- text-indent: -999rem; // Simulate hiding of value as in native `<progress>`
78
- background-color: $progress-bar-color;
79
- @include border-left-radius($progress-border-radius);
80
- }
81
- .progress[width="100%"] {
82
- @include border-right-radius($progress-border-radius);
83
- }
17
+ .progress-bar {
18
+ height: $progress-height;
19
+ color: $progress-bar-color;
20
+ background-color: $progress-bar-bg;
84
21
  }
85
22
 
86
-
87
- //
88
23
  // Striped
89
- //
90
-
91
- .progress-striped[value]::-webkit-progress-value {
24
+ .progress-bar-striped {
92
25
  @include gradient-striped();
93
- background-size: $spacer-y $spacer-y;
94
- }
95
- .progress-striped[value]::-moz-progress-bar {
96
- @include gradient-striped();
97
- background-size: $spacer-y $spacer-y;
98
- }
99
- .progress-striped[value]::-ms-fill {
100
- @include gradient-striped();
101
- background-size: $spacer-y $spacer-y;
102
- }
103
- // IE9
104
- @media screen and (min-width:0\0) {
105
- .progress-bar-striped {
106
- @include gradient-striped();
107
- background-size: $spacer-y $spacer-y;
108
- }
26
+ background-size: $progress-height $progress-height;
109
27
  }
110
28
 
111
-
112
- //
113
29
  // Animated
114
- //
115
-
116
- .progress-animated[value]::-webkit-progress-value {
117
- animation: progress-bar-stripes 2s linear infinite;
118
- }
119
- .progress-animated[value]::-moz-progress-bar {
120
- animation: progress-bar-stripes 2s linear infinite;
121
- }
122
- // IE9
123
- @media screen and (min-width:0\0) {
124
- .progress-animated .progress-bar-striped {
125
- animation: progress-bar-stripes 2s linear infinite;
126
- }
127
- }
128
-
129
-
130
- //
131
- // Variations
132
- //
133
-
134
- .progress-success {
135
- @include progress-variant($progress-bar-success-bg);
136
- }
137
- .progress-info {
138
- @include progress-variant($progress-bar-info-bg);
139
- }
140
- .progress-warning {
141
- @include progress-variant($progress-bar-warning-bg);
142
- }
143
- .progress-danger {
144
- @include progress-variant($progress-bar-danger-bg);
30
+ .progress-bar-animated {
31
+ animation: progress-bar-stripes $progress-bar-animation-timing;
145
32
  }
@@ -55,23 +55,27 @@ html {
55
55
  //
56
56
 
57
57
  html {
58
- // Sets a specific default `font-size` for user with `rem` type scales.
59
- font-size: $font-size-root;
58
+ // We assume no initial pixel `font-size` for accessibility reasons. This
59
+ // allows web visitors to customize their browser default font-size, making
60
+ // your project more inclusive and accessible to everyone.
61
+
60
62
  // As a side-effect of setting the @viewport above,
61
63
  // IE11 & Edge make the scrollbar overlap the content and automatically hide itself when not in use.
62
64
  // Unfortunately, the auto-showing of the scrollbar is sometimes too sensitive,
63
65
  // thus making it hard to click on stuff near the right edge of the page.
64
66
  // So we add this style to force IE11 & Edge to use a "normal", non-overlapping, non-auto-hiding scrollbar.
65
67
  // See https://github.com/twbs/bootstrap/issues/18543
68
+ // and https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7165383/
66
69
  -ms-overflow-style: scrollbar;
70
+
67
71
  // Changes the default tap highlight to be completely transparent in iOS.
68
72
  -webkit-tap-highlight-color: rgba(0,0,0,0);
69
73
  }
70
74
 
71
75
  body {
72
- // Make the `body` use the `font-size-root`
73
76
  font-family: $font-family-base;
74
77
  font-size: $font-size-base;
78
+ font-weight: $font-weight-base;
75
79
  line-height: $line-height-base;
76
80
  // Go easy on the eyes and use something other than `#000` for text
77
81
  color: $body-color;
@@ -111,12 +115,11 @@ p {
111
115
  margin-bottom: 1rem;
112
116
  }
113
117
 
114
- // Abbreviations and acronyms
118
+ // Abbreviations
115
119
  abbr[title],
116
120
  // Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257
117
121
  abbr[data-original-title] {
118
122
  cursor: help;
119
- border-bottom: 1px dotted $abbr-border-color;
120
123
  }
121
124
 
122
125
  address {
@@ -165,10 +168,6 @@ a {
165
168
  color: $link-hover-color;
166
169
  text-decoration: $link-hover-decoration;
167
170
  }
168
-
169
- &:focus {
170
- @include tab-focus();
171
- }
172
171
  }
173
172
 
174
173
  // And undo these styles for placeholder links/named anchors (without href)
@@ -187,7 +186,7 @@ a:not([href]):not([tabindex]) {
187
186
  }
188
187
 
189
188
  &:focus {
190
- outline: none;
189
+ outline: 0;
191
190
  }
192
191
  }
193
192
 
@@ -335,8 +334,8 @@ input[type="month"] {
335
334
  // Remove the default appearance of temporal inputs to avoid a Mobile Safari
336
335
  // bug where setting a custom line-height prevents text from being vertically
337
336
  // centered within the input.
338
- //
339
- // Bug report: https://github.com/twbs/bootstrap/issues/11266
337
+ // See https://bugs.webkit.org/show_bug.cgi?id=139848
338
+ // and https://github.com/twbs/bootstrap/issues/11266
340
339
  -webkit-appearance: listbox;
341
340
  }
342
341
 
@@ -346,9 +345,11 @@ textarea {
346
345
  }
347
346
 
348
347
  fieldset {
349
- // Chrome and Firefox set a `min-width: min-content;` on fieldsets,
350
- // so we reset that to ensure it behaves more like a standard block element.
351
- // See https://github.com/twbs/bootstrap/issues/12359.
348
+ // Browsers set a default `min-width: min-content;` on fieldsets,
349
+ // unlike e.g. `<div>`s, which have `min-width: 0;` by default.
350
+ // So we reset that to ensure fieldsets behave more like a standard block element.
351
+ // See https://github.com/twbs/bootstrap/issues/12359
352
+ // and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
352
353
  min-width: 0;
353
354
  // Reset the default outline behavior of fieldsets so they don't affect page layout.
354
355
  padding: 0;
@@ -3,10 +3,15 @@
3
3
  .embed-responsive {
4
4
  position: relative;
5
5
  display: block;
6
- height: 0;
6
+ width: 100%;
7
7
  padding: 0;
8
8
  overflow: hidden;
9
9
 
10
+ &::before {
11
+ display: block;
12
+ content: "";
13
+ }
14
+
10
15
  .embed-responsive-item,
11
16
  iframe,
12
17
  embed,
@@ -23,17 +28,25 @@
23
28
  }
24
29
 
25
30
  .embed-responsive-21by9 {
26
- padding-bottom: percentage(9 / 21);
31
+ &::before {
32
+ padding-top: percentage(9 / 21);
33
+ }
27
34
  }
28
35
 
29
36
  .embed-responsive-16by9 {
30
- padding-bottom: percentage(9 / 16);
37
+ &::before {
38
+ padding-top: percentage(9 / 16);
39
+ }
31
40
  }
32
41
 
33
42
  .embed-responsive-4by3 {
34
- padding-bottom: percentage(3 / 4);
43
+ &::before {
44
+ padding-top: percentage(3 / 4);
45
+ }
35
46
  }
36
47
 
37
48
  .embed-responsive-1by1 {
38
- padding-bottom: percentage(1 / 1);
49
+ &::before {
50
+ padding-top: percentage(1 / 1);
51
+ }
39
52
  }
@@ -105,26 +105,26 @@
105
105
 
106
106
  .thead-inverse {
107
107
  th {
108
- color: #fff;
109
- background-color: $gray-dark;
108
+ color: $table-inverse-color;
109
+ background-color: $table-inverse-bg;
110
110
  }
111
111
  }
112
112
 
113
113
  .thead-default {
114
114
  th {
115
- color: $gray;
116
- background-color: $gray-lighter;
115
+ color: $table-head-color;
116
+ background-color: $table-head-bg;
117
117
  }
118
118
  }
119
119
 
120
120
  .table-inverse {
121
- color: $gray-lighter;
122
- background-color: $gray-dark;
121
+ color: $table-inverse-color;
122
+ background-color: $table-inverse-bg;
123
123
 
124
124
  th,
125
125
  td,
126
126
  thead th {
127
- border-color: $gray;
127
+ border-color: $body-bg;
128
128
  }
129
129
 
130
130
  &.table-bordered {
@@ -136,61 +136,18 @@
136
136
 
137
137
  // Responsive tables
138
138
  //
139
- // Wrap your tables in `.table-responsive` and we'll make them mobile friendly
140
- // by enabling horizontal scrolling. Only applies <768px. Everything above that
139
+ // Add `.table-responsive` to `.table`s and we'll make them mobile friendly by
140
+ // enabling horizontal scrolling. Only applies <768px. Everything above that
141
141
  // will display normally.
142
142
 
143
143
  .table-responsive {
144
144
  display: block;
145
145
  width: 100%;
146
- min-height: 0%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)
147
146
  overflow-x: auto;
147
+ -ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
148
148
 
149
- // TODO: find out if we need this still.
150
- //
151
- // border: $table-border-width solid $table-border-color;
152
- // -ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
153
- }
154
-
155
-
156
- .table-reflow {
157
- thead {
158
- float: left;
159
- }
160
-
161
- tbody {
162
- display: block;
163
- white-space: nowrap;
164
- }
165
-
166
- th,
167
- td {
168
- border-top: $table-border-width solid $table-border-color;
169
- border-left: $table-border-width solid $table-border-color;
170
-
171
- &:last-child {
172
- border-right: $table-border-width solid $table-border-color;
173
- }
174
- }
175
-
176
- thead,
177
- tbody,
178
- tfoot {
179
- &:last-child {
180
- tr:last-child th,
181
- tr:last-child td {
182
- border-bottom: $table-border-width solid $table-border-color;
183
- }
184
- }
185
- }
186
-
187
- tr {
188
- float: left;
189
-
190
- th,
191
- td {
192
- display: block !important;
193
- border: $table-border-width solid $table-border-color;
194
- }
149
+ // Prevent double border on horizontal scroll due to use of `display: block;`
150
+ &.table-bordered {
151
+ border: 0;
195
152
  }
196
153
  }
@@ -11,7 +11,7 @@
11
11
  word-wrap: break-word;
12
12
  opacity: 0;
13
13
 
14
- &.in { opacity: $tooltip-opacity; }
14
+ &.show { opacity: $tooltip-opacity; }
15
15
 
16
16
  &.tooltip-top,
17
17
  &.bs-tether-element-attached-bottom {
@@ -1,27 +1,27 @@
1
1
  .fade {
2
2
  opacity: 0;
3
- transition: opacity .15s linear;
3
+ @include transition($transition-fade);
4
4
 
5
- &.in {
5
+ &.show {
6
6
  opacity: 1;
7
7
  }
8
8
  }
9
9
 
10
10
  .collapse {
11
11
  display: none;
12
- &.in {
12
+ &.show {
13
13
  display: block;
14
14
  }
15
15
  }
16
16
 
17
17
  tr {
18
- &.collapse.in {
18
+ &.collapse.show {
19
19
  display: table-row;
20
20
  }
21
21
  }
22
22
 
23
23
  tbody {
24
- &.collapse.in {
24
+ &.collapse.show {
25
25
  display: table-row-group;
26
26
  }
27
27
  }
@@ -30,7 +30,5 @@ tbody {
30
30
  position: relative;
31
31
  height: 0;
32
32
  overflow: hidden;
33
- transition-timing-function: ease;
34
- transition-duration: .35s;
35
- transition-property: height;
33
+ @include transition($transition-collapse);
36
34
  }
@@ -27,18 +27,22 @@ h6, .h6 { font-size: $font-size-h6; }
27
27
  .display-1 {
28
28
  font-size: $display1-size;
29
29
  font-weight: $display1-weight;
30
+ line-height: $display-line-height;
30
31
  }
31
32
  .display-2 {
32
33
  font-size: $display2-size;
33
34
  font-weight: $display2-weight;
35
+ line-height: $display-line-height;
34
36
  }
35
37
  .display-3 {
36
38
  font-size: $display3-size;
37
39
  font-weight: $display3-weight;
40
+ line-height: $display-line-height;
38
41
  }
39
42
  .display-4 {
40
43
  font-size: $display4-size;
41
44
  font-weight: $display4-weight;
45
+ line-height: $display-line-height;
42
46
  }
43
47
 
44
48
 
@@ -61,7 +65,7 @@ hr {
61
65
  small,
62
66
  .small {
63
67
  font-size: $small-font-size;
64
- font-weight: normal;
68
+ font-weight: $font-weight-normal;
65
69
  }
66
70
 
67
71
  mark,
@@ -137,14 +141,3 @@ mark,
137
141
  content: "\00A0 \2014"; // nbsp, em dash
138
142
  }
139
143
  }
140
-
141
- @if not $enable-flex {
142
- // Clean up some horizontal `<dl>`s built with grids
143
- // scss-lint:disable QualifyingElement
144
- dl.row {
145
- > dd + dt {
146
- clear: left;
147
- }
148
- }
149
- // scss-lint:enable QualifyingElement
150
- }