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
@@ -4,28 +4,26 @@
4
4
  .btn-group,
5
5
  .btn-group-vertical {
6
6
  position: relative;
7
- display: inline-block;
7
+ display: inline-flex;
8
8
  vertical-align: middle; // match .btn alignment given font-size hack above
9
9
 
10
10
  > .btn {
11
11
  position: relative;
12
- float: left;
13
- margin-bottom: 0;
12
+ flex: 0 1 auto;
14
13
 
15
- // Bring the "active" button to the front
14
+ // Bring the hover, focused, and "active" buttons to the fron to overlay
15
+ // the borders properly
16
+ @include hover {
17
+ z-index: 2;
18
+ }
16
19
  &:focus,
17
20
  &:active,
18
21
  &.active {
19
22
  z-index: 2;
20
23
  }
21
- @include hover {
22
- z-index: 2;
23
- }
24
24
  }
25
- }
26
25
 
27
- // Prevent double borders when buttons are next to each other
28
- .btn-group {
26
+ // Prevent double borders when buttons are next to each other
29
27
  .btn + .btn,
30
28
  .btn + .btn-group,
31
29
  .btn-group + .btn,
@@ -36,18 +34,11 @@
36
34
 
37
35
  // Optional: Group multiple button groups together for a toolbar
38
36
  .btn-toolbar {
39
- margin-left: -$btn-toolbar-margin; // Offset the first child's margin
40
- @include clearfix();
37
+ display: flex;
38
+ justify-content: flex-start;
41
39
 
42
- .btn-group,
43
40
  .input-group {
44
- float: left;
45
- }
46
-
47
- > .btn,
48
- > .btn-group,
49
- > .input-group {
50
- margin-left: $btn-toolbar-margin;
41
+ width: auto;
51
42
  }
52
43
  }
53
44
 
@@ -137,43 +128,19 @@
137
128
  }
138
129
 
139
130
 
140
- // Reposition the caret
141
- .btn .caret {
142
- margin-left: 0;
143
- }
144
- // Carets in other button sizes
145
- .btn-lg .caret {
146
- border-width: $caret-width-lg $caret-width-lg 0;
147
- border-bottom-width: 0;
148
- }
149
- // Upside down carets for .dropup
150
- .dropup .btn-lg .caret {
151
- border-width: 0 $caret-width-lg $caret-width-lg;
152
- }
153
-
154
-
155
-
156
131
  //
157
132
  // Vertical button groups
158
133
  //
159
134
 
160
135
  .btn-group-vertical {
161
- > .btn,
162
- > .btn-group,
163
- > .btn-group > .btn {
164
- display: block;
165
- float: none;
166
- width: 100%;
167
- max-width: 100%;
168
- }
136
+ display: inline-flex;
137
+ flex-direction: column;
138
+ align-items: flex-start;
139
+ justify-content: center;
169
140
 
170
- // Clear floats so dropdown menus can be properly placed
171
- > .btn-group {
172
- @include clearfix();
173
-
174
- > .btn {
175
- float: none;
176
- }
141
+ .btn,
142
+ .btn-group {
143
+ width: 100%;
177
144
  }
178
145
 
179
146
  > .btn + .btn,
@@ -11,41 +11,34 @@
11
11
  text-align: center;
12
12
  white-space: nowrap;
13
13
  vertical-align: middle;
14
- cursor: pointer;
15
14
  user-select: none;
16
15
  border: $input-btn-border-width solid transparent;
17
16
  @include button-size($btn-padding-y, $btn-padding-x, $font-size-base, $btn-border-radius);
18
- @include transition(all .2s ease-in-out);
19
-
20
- &,
21
- &:active,
22
- &.active {
23
- &:focus,
24
- &.focus {
25
- @include tab-focus();
26
- }
27
- }
17
+ @include transition($btn-transition);
28
18
 
19
+ // Share hover and focus styles
29
20
  @include hover-focus {
30
21
  text-decoration: none;
31
22
  }
23
+ &:focus,
32
24
  &.focus {
33
- text-decoration: none;
34
- }
35
-
36
- &:active,
37
- &.active {
38
- background-image: none;
39
25
  outline: 0;
40
- @include box-shadow($btn-active-box-shadow);
26
+ box-shadow: $btn-focus-box-shadow;
41
27
  }
42
28
 
29
+ // Disabled comes first so active can properly restyle
43
30
  &.disabled,
44
31
  &:disabled {
45
32
  cursor: $cursor-disabled;
46
33
  opacity: .65;
47
34
  @include box-shadow(none);
48
35
  }
36
+
37
+ &:active,
38
+ &.active {
39
+ background-image: none;
40
+ @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
41
+ }
49
42
  }
50
43
 
51
44
  // Future-proof disabling of clicks on `<a>` elements
@@ -105,7 +98,7 @@ fieldset[disabled] a.btn {
105
98
 
106
99
  // Make a button look and behave like a link
107
100
  .btn-link {
108
- font-weight: normal;
101
+ font-weight: $font-weight-normal;
109
102
  color: $link-color;
110
103
  border-radius: 0;
111
104
 
@@ -130,8 +123,9 @@ fieldset[disabled] a.btn {
130
123
  background-color: transparent;
131
124
  }
132
125
  &:disabled {
126
+ color: $btn-link-disabled-color;
127
+
133
128
  @include hover-focus {
134
- color: $btn-link-disabled-color;
135
129
  text-decoration: none;
136
130
  }
137
131
  }
@@ -4,16 +4,17 @@
4
4
 
5
5
  .card {
6
6
  position: relative;
7
- display: block;
8
- margin-bottom: $card-spacer-y;
7
+ display: flex;
8
+ flex-direction: column;
9
9
  background-color: $card-bg;
10
- // border: $card-border-width solid $card-border-color;
11
- @include border-radius($card-border-radius);
12
10
  border: $card-border-width solid $card-border-color;
11
+ @include border-radius($card-border-radius);
13
12
  }
14
13
 
15
14
  .card-block {
16
- @include clearfix;
15
+ // Enable `flex-grow: 1` for decks and groups so that card blocks take up
16
+ // as much space as possible, ensuring footers are aligned to the bottom.
17
+ flex: 1 1 auto;
17
18
  padding: $card-spacer-x;
18
19
  }
19
20
 
@@ -30,14 +31,6 @@
30
31
  margin-bottom: 0;
31
32
  }
32
33
 
33
- // .card-actions {
34
- // padding: $card-spacer-y $card-spacer-x;
35
-
36
- // .card-link + .card-link {
37
- // margin-left: $card-spacer-x;
38
- // }
39
- // }
40
-
41
34
  .card-link {
42
35
  @include hover {
43
36
  text-decoration: none;
@@ -68,7 +61,6 @@
68
61
  //
69
62
 
70
63
  .card-header {
71
- @include clearfix;
72
64
  padding: $card-spacer-y $card-spacer-x;
73
65
  margin-bottom: 0; // Removes the default margin-bottom of <hN>
74
66
  background-color: $card-cap-bg;
@@ -80,7 +72,6 @@
80
72
  }
81
73
 
82
74
  .card-footer {
83
- @include clearfix;
84
75
  padding: $card-spacer-y $card-spacer-x;
85
76
  background-color: $card-cap-bg;
86
77
  border-top: $card-border-width solid $card-border-color;
@@ -191,77 +182,39 @@
191
182
  }
192
183
 
193
184
 
194
- // Card set
195
- //
196
- // Heads up! We do some funky style resetting here for margins across our two
197
- // variations (one flex, one table). Individual cards have margin-bottom by
198
- // default, but they're ignored due to table styles. For a consistent design,
199
- // we've done the same to the flex variation.
200
- //
201
- // Those changes are noted by `// Margin balancing`.
185
+ // Card deck
202
186
 
203
- @if $enable-flex {
204
- @include media-breakpoint-up(sm) {
205
- .card-deck {
187
+ @include media-breakpoint-up(sm) {
188
+ .card-deck {
189
+ display: flex;
190
+ flex-flow: row wrap;
191
+
192
+ .card {
206
193
  display: flex;
207
- flex-flow: row wrap;
208
- margin-right: -$card-deck-margin;
209
- margin-bottom: $card-spacer-y; // Margin balancing
210
- margin-left: -$card-deck-margin;
211
-
212
- .card {
213
- flex: 1 0 0;
214
- margin-right: $card-deck-margin;
215
- margin-bottom: 0; // Margin balancing
216
- margin-left: $card-deck-margin;
217
- }
218
- }
219
- }
220
- } @else {
221
- @include media-breakpoint-up(sm) {
222
- $space-between-cards: (2 * $card-deck-margin);
223
- .card-deck {
224
- display: table;
225
- width: 100%;
226
- margin-bottom: $card-spacer-y; // Margin balancing
227
- table-layout: fixed;
228
- border-spacing: $space-between-cards 0;
229
-
230
- .card {
231
- display: table-cell;
232
- margin-bottom: 0; // Margin balancing
233
- vertical-align: top;
234
- }
235
- }
236
- .card-deck-wrapper {
237
- margin-right: (-$space-between-cards);
238
- margin-left: (-$space-between-cards);
194
+ flex: 1 0 0;
195
+ flex-direction: column;
196
+
197
+ // Selectively apply horizontal margins to cards to avoid doing the
198
+ // negative margin dance like our grid. This differs from the grid
199
+ // due to the use of margins as gutters instead of padding.
200
+ &:not(:first-child) { margin-left: $card-deck-margin; }
201
+ &:not(:last-child) { margin-right: $card-deck-margin; }
239
202
  }
240
203
  }
241
204
  }
242
205
 
206
+
243
207
  //
244
208
  // Card groups
245
209
  //
246
210
 
247
211
  @include media-breakpoint-up(sm) {
248
212
  .card-group {
249
- @if $enable-flex {
250
- display: flex;
251
- flex-flow: row wrap;
252
- } @else {
253
- display: table;
254
- width: 100%;
255
- table-layout: fixed;
256
- }
213
+ display: flex;
214
+ flex-flow: row wrap;
257
215
 
258
216
  .card {
259
- @if $enable-flex {
260
- flex: 1 0 0;
261
- } @else {
262
- display: table-cell;
263
- vertical-align: top;
264
- }
217
+ flex: 1 0 0;
265
218
 
266
219
  + .card {
267
220
  margin-left: 0;
@@ -306,17 +259,18 @@
306
259
 
307
260
 
308
261
  //
309
- // Card
262
+ // Columns
310
263
  //
311
264
 
312
265
  @include media-breakpoint-up(sm) {
313
266
  .card-columns {
314
- column-count: 3;
315
- column-gap: $card-columns-sm-up-column-gap;
267
+ column-count: $card-columns-count;
268
+ column-gap: $card-columns-gap;
316
269
 
317
270
  .card {
318
271
  display: inline-block; // Don't let them vertically span multiple columns
319
- width: 100%; // Don't let them exceed the column width
272
+ width: 100%; // Don't let their width change
273
+ margin-bottom: $card-columns-margin;
320
274
  }
321
275
  }
322
276
  }
@@ -7,77 +7,47 @@
7
7
  position: relative;
8
8
  width: 100%;
9
9
  overflow: hidden;
10
+ }
10
11
 
11
- > .carousel-item {
12
- position: relative;
13
- display: none;
14
- transition: .6s ease-in-out left;
15
-
16
- // Account for jankitude on images
17
- > img,
18
- > a > img {
19
- @extend .img-fluid;
20
- line-height: 1;
21
- }
12
+ .carousel-item {
13
+ position: relative;
14
+ display: none;
15
+ width: 100%;
22
16
 
23
- // WebKit CSS3 transforms for supported devices
24
- @media all and (transform-3d), (-webkit-transform-3d) {
25
- transition: transform .6s ease-in-out;
26
- backface-visibility: hidden;
27
- perspective: 1000px;
28
-
29
- &.next,
30
- &.active.right {
31
- left: 0;
32
- transform: translate3d(100%, 0, 0);
33
- }
34
- &.prev,
35
- &.active.left {
36
- left: 0;
37
- transform: translate3d(-100%, 0, 0);
38
- }
39
- &.next.left,
40
- &.prev.right,
41
- &.active {
42
- left: 0;
43
- transform: translate3d(0, 0, 0);
44
- }
45
- }
17
+ @include if-supports-3d-transforms() {
18
+ @include transition($carousel-transition);
19
+ backface-visibility: hidden;
20
+ perspective: 1000px;
46
21
  }
22
+ }
47
23
 
48
- > .active,
49
- > .next,
50
- > .prev {
51
- display: block;
52
- }
24
+ .carousel-item.active,
25
+ .carousel-item-next,
26
+ .carousel-item-prev {
27
+ display: flex;
28
+ }
53
29
 
54
- > .active {
55
- left: 0;
56
- }
30
+ .carousel-item-next,
31
+ .carousel-item-prev {
32
+ position: absolute;
33
+ top: 0;
34
+ }
57
35
 
58
- > .next,
59
- > .prev {
60
- position: absolute;
61
- top: 0;
62
- width: 100%;
36
+ // CSS3 transforms when supported by the browser
37
+ @include if-supports-3d-transforms() {
38
+ .carousel-item-next.carousel-item-left,
39
+ .carousel-item-prev.carousel-item-right {
40
+ transform: translate3d(0, 0, 0);
63
41
  }
64
42
 
65
- > .next {
66
- left: 100%;
67
- }
68
- > .prev {
69
- left: -100%;
70
- }
71
- > .next.left,
72
- > .prev.right {
73
- left: 0;
43
+ .carousel-item-next,
44
+ .active.carousel-item-right {
45
+ transform: translate3d(100%, 0, 0);
74
46
  }
75
47
 
76
- > .active.left {
77
- left: -100%;
78
- }
79
- > .active.right {
80
- left: 100%;
48
+ .carousel-item-prev,
49
+ .active.carousel-item-left {
50
+ transform: translate3d(-100%, 0, 0);
81
51
  }
82
52
  }
83
53
 
@@ -86,30 +56,22 @@
86
56
  // Left/right controls for nav
87
57
  //
88
58
 
89
- .carousel-control {
59
+ .carousel-control-prev,
60
+ .carousel-control-next {
90
61
  position: absolute;
91
62
  top: 0;
92
63
  bottom: 0;
93
- left: 0;
64
+ // Use flex for alignment (1-3)
65
+ display: flex; // 1. allow flex styles
66
+ align-items: center; // 2. vertically center contents
67
+ justify-content: center; // 3. horizontally center contents
94
68
  width: $carousel-control-width;
95
- font-size: $carousel-control-font-size;
96
69
  color: $carousel-control-color;
97
70
  text-align: center;
98
- text-shadow: $carousel-text-shadow;
99
71
  opacity: $carousel-control-opacity;
100
- // We can't have this transition here because WebKit cancels the carousel
72
+ // We can't have a transition here because WebKit cancels the carousel
101
73
  // animation if you trip this while in the middle of another animation.
102
74
 
103
- // Set gradients for backgrounds
104
- &.left {
105
- @include gradient-x($start-color: rgba(0,0,0,.5), $end-color: rgba(0,0,0,.0001));
106
- }
107
- &.right {
108
- right: 0;
109
- left: auto;
110
- @include gradient-x($start-color: rgba(0,0,0,.0001), $end-color: rgba(0,0,0,.5));
111
- }
112
-
113
75
  // Hover/focus state
114
76
  @include hover-focus {
115
77
  color: $carousel-control-color;
@@ -117,79 +79,83 @@
117
79
  outline: 0;
118
80
  opacity: .9;
119
81
  }
82
+ }
83
+ .carousel-control-prev {
84
+ left: 0;
85
+ }
86
+ .carousel-control-next {
87
+ right: 0;
88
+ }
120
89
 
121
- // Toggles
122
- .icon-prev,
123
- .icon-next {
124
- position: absolute;
125
- top: 50%;
126
- z-index: 5;
127
- display: inline-block;
128
- width: $carousel-icon-width;
129
- height: $carousel-icon-width;
130
- margin-top: -($carousel-icon-width / 2);
131
- font-family: serif;
132
- line-height: 1;
133
- }
134
- .icon-prev {
135
- left: 50%;
136
- margin-left: -($carousel-icon-width / 2);
137
- }
138
- .icon-next {
139
- right: 50%;
140
- margin-right: -($carousel-icon-width / 2);
141
- }
142
-
143
- .icon-prev {
144
- &::before {
145
- content: "\2039";// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
146
- }
147
- }
148
- .icon-next {
149
- &::before {
150
- content: "\203a";// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)
151
- }
152
- }
90
+ // Icons for within
91
+ .carousel-control-prev-icon,
92
+ .carousel-control-next-icon {
93
+ display: inline-block;
94
+ width: $carousel-control-icon-width;
95
+ height: $carousel-control-icon-width;
96
+ background: transparent no-repeat center center;
97
+ background-size: 100% 100%;
98
+ }
99
+ .carousel-control-prev-icon {
100
+ background-image: $carousel-control-prev-icon-bg;
101
+ }
102
+ .carousel-control-next-icon {
103
+ background-image: $carousel-control-next-icon-bg;
153
104
  }
154
105
 
155
106
 
156
107
  // Optional indicator pips
157
108
  //
158
- // Add an unordered list with the following class and add a list item for each
109
+ // Add an ordered list with the following class and add a list item for each
159
110
  // slide your carousel holds.
160
111
 
161
112
  .carousel-indicators {
162
113
  position: absolute;
114
+ right: 0;
163
115
  bottom: 10px;
164
- left: 50%;
116
+ left: 0;
165
117
  z-index: 15;
166
- width: $carousel-indicators-width;
167
- padding-left: 0;
168
- margin-left: -($carousel-indicators-width / 2);
169
- text-align: center;
118
+ display: flex;
119
+ justify-content: center;
120
+ padding-left: 0; // override <ol> default
121
+ // Use the .carousel-control's width as margin so we don't overlay those
122
+ margin-right: $carousel-control-width;
123
+ margin-left: $carousel-control-width;
170
124
  list-style: none;
171
125
 
172
126
  li {
173
- display: inline-block;
174
- width: $carousel-indicator-size;
175
- height: $carousel-indicator-size;
176
- margin: 1px;
127
+ position: relative;
128
+ flex: 1 0 auto;
129
+ max-width: $carousel-indicator-width;
130
+ height: $carousel-indicator-height;
131
+ margin-right: $carousel-indicator-spacer;
132
+ margin-left: $carousel-indicator-spacer;
177
133
  text-indent: -999px;
178
134
  cursor: pointer;
179
- // IE9 hack for event handling
180
- //
181
- // Internet Explorer 9 does not properly handle clicks on elements with a `background-color` of `transparent`,
182
- // so we use `rgba(0,0,0,0)` instead since it's a non-buggy equivalent.
183
- // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer
184
- background-color: rgba(0,0,0,0); // IE9
185
- border: 1px solid $carousel-indicator-border-color;
186
- border-radius: $carousel-indicator-size;
135
+ background-color: rgba($carousel-indicator-active-bg, .5);
136
+
137
+ // Use pseudo classes to increase the hit area by 10px on top and bottom.
138
+ &::before {
139
+ position: absolute;
140
+ top: -10px;
141
+ left: 0;
142
+ display: inline-block;
143
+ width: 100%;
144
+ height: 10px;
145
+ content: "";
146
+ }
147
+ &::after {
148
+ position: absolute;
149
+ bottom: -10px;
150
+ left: 0;
151
+ display: inline-block;
152
+ width: 100%;
153
+ height: 10px;
154
+ content: "";
155
+ }
187
156
  }
188
157
 
189
158
  .active {
190
- width: $carousel-indicator-active-size;
191
- height: $carousel-indicator-active-size;
192
- margin: 0;
193
159
  background-color: $carousel-indicator-active-bg;
194
160
  }
195
161
  }
@@ -197,7 +163,7 @@
197
163
 
198
164
  // Optional captions
199
165
  //
200
- // Hidden by default for smaller viewports.
166
+ //
201
167
 
202
168
  .carousel-caption {
203
169
  position: absolute;
@@ -209,45 +175,4 @@
209
175
  padding-bottom: 20px;
210
176
  color: $carousel-caption-color;
211
177
  text-align: center;
212
- text-shadow: $carousel-text-shadow;
213
-
214
- .btn {
215
- text-shadow: none; // No shadow for button elements in carousel-caption
216
- }
217
- }
218
-
219
-
220
- //
221
- // Responsive variations
222
- //
223
-
224
- @include media-breakpoint-up(sm) {
225
- // Scale up the controls a smidge
226
- .carousel-control {
227
- .icon-prev,
228
- .icon-next {
229
- width: $carousel-control-sm-up-size;
230
- height: $carousel-control-sm-up-size;
231
- margin-top: -($carousel-control-sm-up-size / 2);
232
- font-size: $carousel-control-sm-up-size;
233
- }
234
- .icon-prev {
235
- margin-left: -($carousel-control-sm-up-size / 2);
236
- }
237
- .icon-next {
238
- margin-right: -($carousel-control-sm-up-size / 2);
239
- }
240
- }
241
-
242
- // Show and left align the captions
243
- .carousel-caption {
244
- right: ((100% - $carousel-caption-sm-up-width) / 2);
245
- left: ((100% - $carousel-caption-sm-up-width) / 2);
246
- padding-bottom: 30px;
247
- }
248
-
249
- // Move up the indicators
250
- .carousel-indicators {
251
- bottom: 20px;
252
- }
253
178
  }