bootstrap 4.4.1 → 5.0.0.alpha2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +12 -2
  3. data/README.md +1 -1
  4. data/assets/javascripts/bootstrap-sprockets.js +12 -8
  5. data/assets/javascripts/bootstrap.js +2094 -1562
  6. data/assets/javascripts/bootstrap.min.js +4 -4
  7. data/assets/javascripts/bootstrap/alert.js +145 -83
  8. data/assets/javascripts/bootstrap/button.js +66 -152
  9. data/assets/javascripts/bootstrap/carousel.js +307 -241
  10. data/assets/javascripts/bootstrap/collapse.js +287 -183
  11. data/assets/javascripts/bootstrap/dom/data.js +81 -0
  12. data/assets/javascripts/bootstrap/dom/event-handler.js +315 -0
  13. data/assets/javascripts/bootstrap/dom/manipulator.js +96 -0
  14. data/assets/javascripts/bootstrap/dom/polyfill.js +110 -0
  15. data/assets/javascripts/bootstrap/dom/selector-engine.js +98 -0
  16. data/assets/javascripts/bootstrap/dropdown.js +255 -261
  17. data/assets/javascripts/bootstrap/modal.js +364 -270
  18. data/assets/javascripts/bootstrap/popover.js +72 -113
  19. data/assets/javascripts/bootstrap/scrollspy.js +162 -147
  20. data/assets/javascripts/bootstrap/tab.js +176 -108
  21. data/assets/javascripts/bootstrap/toast.js +179 -139
  22. data/assets/javascripts/bootstrap/tooltip.js +369 -259
  23. data/assets/stylesheets/_bootstrap-grid.scss +54 -18
  24. data/assets/stylesheets/_bootstrap-reboot.scss +7 -4
  25. data/assets/stylesheets/_bootstrap.scss +17 -11
  26. data/assets/stylesheets/bootstrap/_alert.scss +6 -7
  27. data/assets/stylesheets/bootstrap/_badge.scss +2 -27
  28. data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -17
  29. data/assets/stylesheets/bootstrap/_button-group.scss +16 -38
  30. data/assets/stylesheets/bootstrap/_buttons.scss +25 -40
  31. data/assets/stylesheets/bootstrap/_card.scss +43 -79
  32. data/assets/stylesheets/bootstrap/_carousel.scss +30 -15
  33. data/assets/stylesheets/bootstrap/_close.scss +31 -31
  34. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  35. data/assets/stylesheets/bootstrap/_dropdown.scss +54 -9
  36. data/assets/stylesheets/bootstrap/_forms.scss +9 -338
  37. data/assets/stylesheets/bootstrap/_functions.scss +97 -25
  38. data/assets/stylesheets/bootstrap/_grid.scss +3 -50
  39. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  40. data/assets/stylesheets/bootstrap/_list-group.scss +16 -17
  41. data/assets/stylesheets/bootstrap/_mixins.scss +7 -13
  42. data/assets/stylesheets/bootstrap/_modal.scss +41 -45
  43. data/assets/stylesheets/bootstrap/_nav.scss +16 -9
  44. data/assets/stylesheets/bootstrap/_navbar.scss +43 -74
  45. data/assets/stylesheets/bootstrap/_pagination.scss +11 -20
  46. data/assets/stylesheets/bootstrap/_popover.scss +5 -5
  47. data/assets/stylesheets/bootstrap/_progress.scss +2 -3
  48. data/assets/stylesheets/bootstrap/_reboot.scss +310 -175
  49. data/assets/stylesheets/bootstrap/_root.scss +5 -9
  50. data/assets/stylesheets/bootstrap/_spinners.scss +5 -4
  51. data/assets/stylesheets/bootstrap/_tables.scss +80 -114
  52. data/assets/stylesheets/bootstrap/_toasts.scss +6 -2
  53. data/assets/stylesheets/bootstrap/_tooltip.scss +5 -5
  54. data/assets/stylesheets/bootstrap/_transitions.scss +0 -1
  55. data/assets/stylesheets/bootstrap/_type.scss +38 -59
  56. data/assets/stylesheets/bootstrap/_utilities.scss +531 -17
  57. data/assets/stylesheets/bootstrap/_variables.scss +609 -444
  58. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  59. data/assets/stylesheets/bootstrap/forms/_form-check.scss +142 -0
  60. data/assets/stylesheets/bootstrap/forms/_form-control.scss +116 -0
  61. data/assets/stylesheets/bootstrap/forms/_form-file.scss +91 -0
  62. data/assets/stylesheets/bootstrap/forms/_form-range.scss +136 -0
  63. data/assets/stylesheets/bootstrap/forms/_form-select.scss +82 -0
  64. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  65. data/assets/stylesheets/bootstrap/forms/_input-group.scss +140 -0
  66. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  67. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  68. data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
  69. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  70. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  71. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
  72. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  73. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  74. data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
  75. data/assets/stylesheets/bootstrap/mixins/_alert.scss +0 -4
  76. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +35 -22
  77. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
  78. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +14 -10
  79. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +69 -51
  80. data/assets/stylesheets/bootstrap/mixins/_caret.scss +4 -4
  81. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  82. data/assets/stylesheets/bootstrap/mixins/_container.scss +11 -0
  83. data/assets/stylesheets/bootstrap/mixins/_forms.scss +22 -66
  84. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +9 -11
  85. data/assets/stylesheets/bootstrap/mixins/_grid.scss +84 -33
  86. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
  87. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -1
  88. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  89. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +15 -8
  90. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
  91. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  92. data/assets/stylesheets/bootstrap/mixins/_transition.scss +18 -8
  93. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +49 -0
  94. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +28 -0
  95. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  96. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +234 -126
  97. data/lib/bootstrap/version.rb +2 -2
  98. data/tasks/updater/js.rb +3 -3
  99. data/tasks/updater/network.rb +2 -2
  100. data/test/gemfiles/rails_6_0.gemfile +7 -0
  101. metadata +36 -41
  102. data/assets/javascripts/bootstrap/util.js +0 -188
  103. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  104. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -521
  105. data/assets/stylesheets/bootstrap/_input-group.scss +0 -191
  106. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
  107. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  108. data/assets/stylesheets/bootstrap/_print.scss +0 -141
  109. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -22
  110. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
  111. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
  112. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -71
  113. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  114. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
  115. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -34
  116. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
  117. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
  118. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
  119. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
  120. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
  121. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  122. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  123. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
  124. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
  125. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
  126. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  127. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
  128. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
  129. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
  130. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  131. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  132. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
  133. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
  134. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
  135. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
  136. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
@@ -19,36 +19,43 @@
19
19
  margin-left: 0;
20
20
  }
21
21
 
22
- > .list-group:first-child {
23
- .list-group-item:first-child {
24
- @include border-top-radius($card-border-radius);
22
+ > .list-group {
23
+ border-top: inherit;
24
+ border-bottom: inherit;
25
+
26
+ &:first-child {
27
+ border-top-width: 0;
28
+ @include border-top-radius($card-inner-border-radius);
25
29
  }
26
- }
27
30
 
28
- > .list-group:last-child {
29
- .list-group-item:last-child {
30
- @include border-bottom-radius($card-border-radius);
31
+ &:last-child {
32
+ border-bottom-width: 0;
33
+ @include border-bottom-radius($card-inner-border-radius);
31
34
  }
32
35
  }
36
+
37
+ // Due to specificity of the above selector (`.card > .list-group`), we must
38
+ // use a child selector here to prevent double borders.
39
+ > .card-header + .list-group,
40
+ > .list-group + .card-footer {
41
+ border-top: 0;
42
+ }
33
43
  }
34
44
 
35
45
  .card-body {
36
46
  // Enable `flex-grow: 1` for decks and groups so that card blocks take up
37
47
  // as much space as possible, ensuring footers are aligned to the bottom.
38
48
  flex: 1 1 auto;
39
- // Workaround for the image size bug in IE
40
- // See: https://github.com/twbs/bootstrap/pull/28855
41
- min-height: 1px;
42
- padding: $card-spacer-x;
49
+ padding: $card-spacer-y $card-spacer-x;
43
50
  color: $card-color;
44
51
  }
45
52
 
46
53
  .card-title {
47
- margin-bottom: $card-spacer-y;
54
+ margin-bottom: $card-title-spacer-y;
48
55
  }
49
56
 
50
57
  .card-subtitle {
51
- margin-top: -$card-spacer-y / 2;
58
+ margin-top: -$card-title-spacer-y / 2;
52
59
  margin-bottom: 0;
53
60
  }
54
61
 
@@ -57,7 +64,7 @@
57
64
  }
58
65
 
59
66
  .card-link {
60
- @include hover() {
67
+ &:hover {
61
68
  text-decoration: none;
62
69
  }
63
70
 
@@ -71,7 +78,7 @@
71
78
  //
72
79
 
73
80
  .card-header {
74
- padding: $card-spacer-y $card-spacer-x;
81
+ padding: $card-cap-padding-y $card-cap-padding-x;
75
82
  margin-bottom: 0; // Removes the default margin-bottom of <hN>
76
83
  color: $card-cap-color;
77
84
  background-color: $card-cap-bg;
@@ -80,16 +87,11 @@
80
87
  &:first-child {
81
88
  @include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
82
89
  }
83
-
84
- + .list-group {
85
- .list-group-item:first-child {
86
- border-top: 0;
87
- }
88
- }
89
90
  }
90
91
 
91
92
  .card-footer {
92
- padding: $card-spacer-y $card-spacer-x;
93
+ padding: $card-cap-padding-y $card-cap-padding-x;
94
+ color: $card-cap-color;
93
95
  background-color: $card-cap-bg;
94
96
  border-top: $card-border-width solid $card-border-color;
95
97
 
@@ -104,15 +106,22 @@
104
106
  //
105
107
 
106
108
  .card-header-tabs {
107
- margin-right: -$card-spacer-x / 2;
108
- margin-bottom: -$card-spacer-y;
109
- margin-left: -$card-spacer-x / 2;
109
+ margin-right: -$card-cap-padding-x / 2;
110
+ margin-bottom: -$card-cap-padding-y;
111
+ margin-left: -$card-cap-padding-x / 2;
110
112
  border-bottom: 0;
113
+
114
+ @if $nav-tabs-link-active-bg != $card-bg {
115
+ .nav-link.active {
116
+ background-color: $card-bg;
117
+ border-bottom-color: $card-bg;
118
+ }
119
+ }
111
120
  }
112
121
 
113
122
  .card-header-pills {
114
- margin-right: -$card-spacer-x / 2;
115
- margin-left: -$card-spacer-x / 2;
123
+ margin-right: -$card-cap-padding-x / 2;
124
+ margin-left: -$card-cap-padding-x / 2;
116
125
  }
117
126
 
118
127
  // Card image
@@ -123,12 +132,12 @@
123
132
  bottom: 0;
124
133
  left: 0;
125
134
  padding: $card-img-overlay-padding;
135
+ @include border-radius($card-inner-border-radius);
126
136
  }
127
137
 
128
138
  .card-img,
129
139
  .card-img-top,
130
140
  .card-img-bottom {
131
- flex-shrink: 0; // For IE: https://github.com/twbs/bootstrap/issues/29396
132
141
  width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
133
142
  }
134
143
 
@@ -143,30 +152,6 @@
143
152
  }
144
153
 
145
154
 
146
- // Card deck
147
-
148
- .card-deck {
149
- .card {
150
- margin-bottom: $card-deck-margin;
151
- }
152
-
153
- @include media-breakpoint-up(sm) {
154
- display: flex;
155
- flex-flow: row wrap;
156
- margin-right: -$card-deck-margin;
157
- margin-left: -$card-deck-margin;
158
-
159
- .card {
160
- // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
161
- flex: 1 0 0%;
162
- margin-right: $card-deck-margin;
163
- margin-bottom: 0; // Override the default
164
- margin-left: $card-deck-margin;
165
- }
166
- }
167
- }
168
-
169
-
170
155
  //
171
156
  // Card groups
172
157
  //
@@ -200,12 +185,12 @@
200
185
 
201
186
  .card-img-top,
202
187
  .card-header {
203
- // stylelint-disable-next-line property-blacklist
188
+ // stylelint-disable-next-line property-disallowed-list
204
189
  border-top-right-radius: 0;
205
190
  }
206
191
  .card-img-bottom,
207
192
  .card-footer {
208
- // stylelint-disable-next-line property-blacklist
193
+ // stylelint-disable-next-line property-disallowed-list
209
194
  border-bottom-right-radius: 0;
210
195
  }
211
196
  }
@@ -215,12 +200,12 @@
215
200
 
216
201
  .card-img-top,
217
202
  .card-header {
218
- // stylelint-disable-next-line property-blacklist
203
+ // stylelint-disable-next-line property-disallowed-list
219
204
  border-top-left-radius: 0;
220
205
  }
221
206
  .card-img-bottom,
222
207
  .card-footer {
223
- // stylelint-disable-next-line property-blacklist
208
+ // stylelint-disable-next-line property-disallowed-list
224
209
  border-bottom-left-radius: 0;
225
210
  }
226
211
  }
@@ -230,34 +215,13 @@
230
215
  }
231
216
 
232
217
 
233
- //
234
- // Columns
235
- //
236
-
237
- .card-columns {
238
- .card {
239
- margin-bottom: $card-columns-margin;
240
- }
241
-
242
- @include media-breakpoint-up(sm) {
243
- column-count: $card-columns-count;
244
- column-gap: $card-columns-gap;
245
- orphans: 1;
246
- widows: 1;
247
-
248
- .card {
249
- display: inline-block; // Don't let them vertically span multiple columns
250
- width: 100%; // Don't let their width change
251
- }
252
- }
253
- }
254
-
255
-
256
218
  //
257
219
  // Accordion
258
220
  //
259
221
 
260
222
  .accordion {
223
+ overflow-anchor: none;
224
+
261
225
  > .card {
262
226
  overflow: hidden;
263
227
 
@@ -101,7 +101,8 @@
101
101
  @include transition($carousel-control-transition);
102
102
 
103
103
  // Hover/focus state
104
- @include hover-focus() {
104
+ &:hover,
105
+ &:focus {
105
106
  color: $carousel-control-color;
106
107
  text-decoration: none;
107
108
  outline: 0;
@@ -110,15 +111,11 @@
110
111
  }
111
112
  .carousel-control-prev {
112
113
  left: 0;
113
- @if $enable-gradients {
114
- background-image: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
115
- }
114
+ background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null);
116
115
  }
117
116
  .carousel-control-next {
118
117
  right: 0;
119
- @if $enable-gradients {
120
- background-image: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
121
- }
118
+ background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null);
122
119
  }
123
120
 
124
121
  // Icons for within
@@ -127,7 +124,9 @@
127
124
  display: inline-block;
128
125
  width: $carousel-control-icon-width;
129
126
  height: $carousel-control-icon-width;
130
- background: no-repeat 50% / 100% 100%;
127
+ background-repeat: no-repeat;
128
+ background-position: 50%;
129
+ background-size: 100% 100%;
131
130
  }
132
131
  .carousel-control-prev-icon {
133
132
  background-image: escape-svg($carousel-control-prev-icon-bg);
@@ -147,7 +146,7 @@
147
146
  right: 0;
148
147
  bottom: 0;
149
148
  left: 0;
150
- z-index: 15;
149
+ z-index: 2;
151
150
  display: flex;
152
151
  justify-content: center;
153
152
  padding-left: 0; // override <ol> default
@@ -170,12 +169,12 @@
170
169
  // Use transparent borders to increase the hit area by 10px on top and bottom.
171
170
  border-top: $carousel-indicator-hit-area-height solid transparent;
172
171
  border-bottom: $carousel-indicator-hit-area-height solid transparent;
173
- opacity: .5;
172
+ opacity: $carousel-indicator-opacity;
174
173
  @include transition($carousel-indicator-transition);
175
174
  }
176
175
 
177
176
  .active {
178
- opacity: 1;
177
+ opacity: $carousel-indicator-active-opacity;
179
178
  }
180
179
  }
181
180
 
@@ -187,11 +186,27 @@
187
186
  .carousel-caption {
188
187
  position: absolute;
189
188
  right: (100% - $carousel-caption-width) / 2;
190
- bottom: 20px;
189
+ bottom: $carousel-caption-spacer;
191
190
  left: (100% - $carousel-caption-width) / 2;
192
- z-index: 10;
193
- padding-top: 20px;
194
- padding-bottom: 20px;
191
+ padding-top: $carousel-caption-padding-y;
192
+ padding-bottom: $carousel-caption-padding-y;
195
193
  color: $carousel-caption-color;
196
194
  text-align: center;
197
195
  }
196
+
197
+ // Dark mode carousel
198
+
199
+ .carousel-dark {
200
+ .carousel-control-prev-icon,
201
+ .carousel-control-next-icon {
202
+ filter: $carousel-dark-control-icon-filter;
203
+ }
204
+
205
+ .carousel-indicators li {
206
+ background-color: $carousel-dark-indicator-active-bg;
207
+ }
208
+
209
+ .carousel-caption {
210
+ color: $carousel-dark-caption-color;
211
+ }
212
+ }
@@ -1,41 +1,41 @@
1
- .close {
2
- float: right;
3
- @include font-size($close-font-size);
4
- font-weight: $close-font-weight;
5
- line-height: 1;
6
- color: $close-color;
7
- text-shadow: $close-text-shadow;
8
- opacity: .5;
1
+ // transparent background and border properties included for button version.
2
+ // iOS requires the button element instead of an anchor tag.
3
+ // If you want the anchor version, it requires `href="#"`.
4
+ // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
5
+
6
+ .btn-close {
7
+ box-sizing: content-box;
8
+ width: $btn-close-width;
9
+ height: $btn-close-height;
10
+ padding: $btn-close-padding-y $btn-close-padding-x;
11
+ color: $btn-close-color;
12
+ background: transparent escape-svg($btn-close-bg) no-repeat center center / $btn-close-width auto; // include transparent for button elements
13
+ background-clip: content-box;
14
+ border: 0; // for button elements
15
+ @include border-radius();
16
+ opacity: $btn-close-opacity;
9
17
 
10
18
  // Override <a>'s hover style
11
- @include hover() {
12
- color: $close-color;
19
+ &:hover {
20
+ color: $btn-close-color;
13
21
  text-decoration: none;
22
+ opacity: $btn-close-hover-opacity;
14
23
  }
15
24
 
16
- &:not(:disabled):not(.disabled) {
17
- @include hover-focus() {
18
- opacity: .75;
19
- }
25
+ &:focus {
26
+ outline: none;
27
+ box-shadow: $btn-close-focus-shadow;
28
+ opacity: $btn-close-focus-opacity;
20
29
  }
21
- }
22
30
 
23
- // Additional properties for button version
24
- // iOS requires the button element instead of an anchor tag.
25
- // If you want the anchor version, it requires `href="#"`.
26
- // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
27
-
28
- // stylelint-disable-next-line selector-no-qualifying-type
29
- button.close {
30
- padding: 0;
31
- background-color: transparent;
32
- border: 0;
33
- appearance: none;
31
+ &:disabled,
32
+ &.disabled {
33
+ pointer-events: none;
34
+ user-select: none;
35
+ opacity: $btn-close-disabled-opacity;
36
+ }
34
37
  }
35
38
 
36
- // Future-proof disabling of clicks on `<a>` elements
37
-
38
- // stylelint-disable-next-line selector-no-qualifying-type
39
- a.close.disabled {
40
- pointer-events: none;
39
+ .btn-close-white {
40
+ filter: $btn-close-white-filter;
41
41
  }
@@ -0,0 +1,41 @@
1
+ // Container widths
2
+ //
3
+ // Set the container width, and override it for fixed navbars in media queries.
4
+
5
+ @if $enable-grid-classes {
6
+ // Single container class with breakpoint max-widths
7
+ .container,
8
+ // 100% wide container at all breakpoints
9
+ .container-fluid {
10
+ @include make-container();
11
+ }
12
+
13
+ // Responsive containers that are 100% wide until a breakpoint
14
+ @each $breakpoint, $container-max-width in $container-max-widths {
15
+ .container-#{$breakpoint} {
16
+ @extend .container-fluid;
17
+ }
18
+
19
+ @include media-breakpoint-up($breakpoint, $grid-breakpoints) {
20
+ %responsive-container-#{$breakpoint} {
21
+ max-width: $container-max-width;
22
+ }
23
+
24
+ // Extend each breakpoint which is smaller or equal to the current breakpoint
25
+ $extend-breakpoint: true;
26
+
27
+ @each $name, $width in $grid-breakpoints {
28
+ @if ($extend-breakpoint) {
29
+ .container#{breakpoint-infix($name, $grid-breakpoints)} {
30
+ @extend %responsive-container-#{$breakpoint};
31
+ }
32
+
33
+ // Once the current breakpoint is reached, stop extending
34
+ @if ($breakpoint == $name) {
35
+ $extend-breakpoint: false;
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
@@ -20,9 +20,8 @@
20
20
  left: 0;
21
21
  z-index: $zindex-dropdown;
22
22
  display: none; // none by default, but block on "open" of the menu
23
- float: left;
24
23
  min-width: $dropdown-min-width;
25
- padding: $dropdown-padding-y 0;
24
+ padding: $dropdown-padding-y $dropdown-padding-x;
26
25
  margin: $dropdown-spacer 0 0; // override default ul
27
26
  @include font-size($dropdown-font-size);
28
27
  color: $dropdown-color;
@@ -35,6 +34,7 @@
35
34
  @include box-shadow($dropdown-box-shadow);
36
35
  }
37
36
 
37
+ // scss-docs-start responsive-breakpoints
38
38
  @each $breakpoint in map-keys($grid-breakpoints) {
39
39
  @include media-breakpoint-up($breakpoint) {
40
40
  $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@@ -50,6 +50,7 @@
50
50
  }
51
51
  }
52
52
  }
53
+ // scss-docs-end responsive-breakpoints
53
54
 
54
55
  // Allow for dropdowns to go bottom up (aka, dropup-menu)
55
56
  // Just add .dropup after the standard .dropdown class and you're set.
@@ -114,7 +115,10 @@
114
115
 
115
116
  // Dividers (basically an `<hr>`) within the dropdown
116
117
  .dropdown-divider {
117
- @include nav-divider($dropdown-divider-bg, $dropdown-divider-margin-y, true);
118
+ height: 0;
119
+ margin: $dropdown-divider-margin-y 0;
120
+ overflow: hidden;
121
+ border-top: 1px solid $dropdown-divider-bg;
118
122
  }
119
123
 
120
124
  // Links, buttons, and more within the dropdown menu
@@ -128,6 +132,7 @@
128
132
  font-weight: $font-weight-normal;
129
133
  color: $dropdown-link-color;
130
134
  text-align: inherit; // For `<button>`s
135
+ text-decoration: if($link-decoration == none, null, none);
131
136
  white-space: nowrap; // prevent links from randomly breaking onto new lines
132
137
  background-color: transparent; // For `<button>`s
133
138
  border: 0; // For `<button>`s
@@ -144,9 +149,10 @@
144
149
  }
145
150
  }
146
151
 
147
- @include hover-focus() {
152
+ &:hover,
153
+ &:focus {
148
154
  color: $dropdown-link-hover-color;
149
- text-decoration: none;
155
+ text-decoration: if($link-hover-decoration == underline, none, null);
150
156
  @include gradient-bg($dropdown-link-hover-bg);
151
157
  }
152
158
 
@@ -163,9 +169,7 @@
163
169
  pointer-events: none;
164
170
  background-color: transparent;
165
171
  // Remove CSS gradients if they're enabled
166
- @if $enable-gradients {
167
- background-image: none;
168
- }
172
+ background-image: if($enable-gradients, none, null);
169
173
  }
170
174
  }
171
175
 
@@ -176,7 +180,7 @@
176
180
  // Dropdown section headers
177
181
  .dropdown-header {
178
182
  display: block;
179
- padding: $dropdown-padding-y $dropdown-item-padding-x;
183
+ padding: $dropdown-header-padding;
180
184
  margin-bottom: 0; // for use with heading elements
181
185
  @include font-size($font-size-sm);
182
186
  color: $dropdown-header-color;
@@ -189,3 +193,44 @@
189
193
  padding: $dropdown-item-padding-y $dropdown-item-padding-x;
190
194
  color: $dropdown-link-color;
191
195
  }
196
+
197
+ // Dark dropdowns
198
+ .dropdown-menu-dark {
199
+ color: $dropdown-dark-color;
200
+ background-color: $dropdown-dark-bg;
201
+ border-color: $dropdown-dark-border-color;
202
+ @include box-shadow($dropdown-dark-box-shadow);
203
+
204
+ .dropdown-item {
205
+ color: $dropdown-dark-link-color;
206
+
207
+ &:hover,
208
+ &:focus {
209
+ color: $dropdown-dark-link-hover-color;
210
+ @include gradient-bg($dropdown-dark-link-hover-bg);
211
+ }
212
+
213
+ &.active,
214
+ &:active {
215
+ color: $dropdown-dark-link-active-color;
216
+ @include gradient-bg($dropdown-dark-link-active-bg);
217
+ }
218
+
219
+ &.disabled,
220
+ &:disabled {
221
+ color: $dropdown-dark-link-disabled-color;
222
+ }
223
+ }
224
+
225
+ .dropdown-divider {
226
+ border-color: $dropdown-dark-divider-bg;
227
+ }
228
+
229
+ .dropdown-item-text {
230
+ color: $dropdown-dark-link-color;
231
+ }
232
+
233
+ .dropdown-header {
234
+ color: $dropdown-dark-header-color;
235
+ }
236
+ }