bootstrap 4.1.3 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +17 -2
  3. data/CHANGELOG.md +2 -14
  4. data/README.md +7 -4
  5. data/Rakefile +2 -2
  6. data/assets/javascripts/bootstrap/alert.js +226 -166
  7. data/assets/javascripts/bootstrap/base-component.js +63 -0
  8. data/assets/javascripts/bootstrap/button.js +119 -165
  9. data/assets/javascripts/bootstrap/carousel.js +634 -445
  10. data/assets/javascripts/bootstrap/collapse.js +447 -327
  11. data/assets/javascripts/bootstrap/dom/data.js +68 -0
  12. data/assets/javascripts/bootstrap/dom/event-handler.js +322 -0
  13. data/assets/javascripts/bootstrap/dom/manipulator.js +88 -0
  14. data/assets/javascripts/bootstrap/dom/selector-engine.js +85 -0
  15. data/assets/javascripts/bootstrap/dropdown.js +550 -425
  16. data/assets/javascripts/bootstrap/modal.js +695 -492
  17. data/assets/javascripts/bootstrap/offcanvas.js +671 -0
  18. data/assets/javascripts/bootstrap/popover.js +167 -217
  19. data/assets/javascripts/bootstrap/scrollspy.js +319 -302
  20. data/assets/javascripts/bootstrap/tab.js +303 -221
  21. data/assets/javascripts/bootstrap/toast.js +333 -0
  22. data/assets/javascripts/bootstrap/tooltip.js +896 -577
  23. data/assets/javascripts/bootstrap-global-this-define.js +6 -0
  24. data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
  25. data/assets/javascripts/bootstrap-sprockets.js +15 -7
  26. data/assets/javascripts/bootstrap.js +4262 -3163
  27. data/assets/javascripts/bootstrap.min.js +4 -4
  28. data/assets/stylesheets/_bootstrap-grid.scss +54 -21
  29. data/assets/stylesheets/_bootstrap-reboot.scss +7 -4
  30. data/assets/stylesheets/_bootstrap.scss +21 -11
  31. data/assets/stylesheets/bootstrap/_accordion.scss +118 -0
  32. data/assets/stylesheets/bootstrap/_alert.scss +15 -9
  33. data/assets/stylesheets/bootstrap/_badge.scss +3 -21
  34. data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -18
  35. data/assets/stylesheets/bootstrap/_button-group.scss +29 -62
  36. data/assets/stylesheets/bootstrap/_buttons.scss +33 -65
  37. data/assets/stylesheets/bootstrap/_card.scss +55 -141
  38. data/assets/stylesheets/bootstrap/_carousel.scss +94 -101
  39. data/assets/stylesheets/bootstrap/_close.scss +33 -28
  40. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  41. data/assets/stylesheets/bootstrap/_dropdown.scss +114 -40
  42. data/assets/stylesheets/bootstrap/_forms.scss +9 -333
  43. data/assets/stylesheets/bootstrap/_functions.scss +148 -29
  44. data/assets/stylesheets/bootstrap/_grid.scss +4 -34
  45. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  46. data/assets/stylesheets/bootstrap/_images.scss +4 -4
  47. data/assets/stylesheets/bootstrap/_list-group.scss +86 -27
  48. data/assets/stylesheets/bootstrap/_mixins.scss +17 -16
  49. data/assets/stylesheets/bootstrap/_modal.scss +90 -42
  50. data/assets/stylesheets/bootstrap/_nav.scss +31 -10
  51. data/assets/stylesheets/bootstrap/_navbar.scss +68 -61
  52. data/assets/stylesheets/bootstrap/_offcanvas.scss +77 -0
  53. data/assets/stylesheets/bootstrap/_pagination.scss +13 -27
  54. data/assets/stylesheets/bootstrap/_popover.scss +63 -88
  55. data/assets/stylesheets/bootstrap/_progress.scss +20 -6
  56. data/assets/stylesheets/bootstrap/_reboot.scss +349 -211
  57. data/assets/stylesheets/bootstrap/_root.scss +5 -8
  58. data/assets/stylesheets/bootstrap/_spinners.scss +69 -0
  59. data/assets/stylesheets/bootstrap/_tables.scss +79 -116
  60. data/assets/stylesheets/bootstrap/_toasts.scss +51 -0
  61. data/assets/stylesheets/bootstrap/_tooltip.scss +18 -18
  62. data/assets/stylesheets/bootstrap/_transitions.scss +2 -3
  63. data/assets/stylesheets/bootstrap/_type.scss +42 -63
  64. data/assets/stylesheets/bootstrap/_utilities.scss +594 -15
  65. data/assets/stylesheets/bootstrap/_variables.scss +952 -440
  66. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  67. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +61 -0
  68. data/assets/stylesheets/bootstrap/forms/_form-check.scss +152 -0
  69. data/assets/stylesheets/bootstrap/forms/_form-control.scss +219 -0
  70. data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
  71. data/assets/stylesheets/bootstrap/forms/_form-select.scss +67 -0
  72. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  73. data/assets/stylesheets/bootstrap/forms/_input-group.scss +121 -0
  74. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  75. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  76. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  77. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  78. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
  79. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  80. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  81. data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
  82. data/assets/stylesheets/bootstrap/mixins/_alert.scss +3 -5
  83. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +57 -14
  84. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +14 -1
  85. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +13 -9
  86. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +77 -53
  87. data/assets/stylesheets/bootstrap/mixins/_caret.scss +14 -16
  88. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  89. data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
  90. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  91. data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
  92. data/assets/stylesheets/bootstrap/mixins/_forms.scss +87 -97
  93. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
  94. data/assets/stylesheets/bootstrap/mixins/_grid.scss +106 -33
  95. data/assets/stylesheets/bootstrap/mixins/_image.scss +0 -20
  96. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
  97. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +18 -9
  98. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
  99. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  100. data/assets/stylesheets/bootstrap/mixins/_transition.scss +19 -6
  101. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +68 -0
  102. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +29 -0
  103. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  104. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +312 -0
  105. data/bootstrap.gemspec +7 -6
  106. data/lib/bootstrap/engine.rb +3 -0
  107. data/lib/bootstrap/version.rb +4 -2
  108. data/lib/bootstrap.rb +10 -7
  109. data/tasks/updater/js.rb +20 -5
  110. data/tasks/updater/network.rb +8 -2
  111. data/test/dummy_rails/app/assets/config/manifest.js +3 -0
  112. data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
  113. data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
  114. data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
  115. data/test/dummy_rails/app/views/pages/root.html +89 -0
  116. data/test/dummy_rails/config/application.rb +0 -3
  117. data/test/gemfiles/rails_6_0.gemfile +7 -0
  118. data/test/gemfiles/rails_6_1.gemfile +7 -0
  119. data/test/support/dummy_rails_integration.rb +3 -1
  120. data/test/test_helper.rb +18 -13
  121. metadata +64 -79
  122. data/assets/javascripts/bootstrap/util.js +0 -143
  123. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  124. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -433
  125. data/assets/stylesheets/bootstrap/_input-group.scss +0 -173
  126. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -16
  127. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  128. data/assets/stylesheets/bootstrap/_print.scss +0 -141
  129. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -21
  130. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -12
  131. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -11
  132. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -67
  133. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  134. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
  135. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -33
  136. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -6
  137. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -30
  138. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -14
  139. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -13
  140. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -7
  141. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  142. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  143. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -59
  144. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -38
  145. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -52
  146. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  147. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -9
  148. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -37
  149. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  150. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  151. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -12
  152. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -51
  153. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -58
  154. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -11
  155. data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
  156. /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -18,11 +18,11 @@
18
18
  .modal {
19
19
  position: fixed;
20
20
  top: 0;
21
- right: 0;
22
- bottom: 0;
23
21
  left: 0;
24
22
  z-index: $zindex-modal;
25
23
  display: none;
24
+ width: 100%;
25
+ height: 100%;
26
26
  overflow: hidden;
27
27
  // Prevent Chrome on Windows from adding a focus outline. For details, see
28
28
  // https://github.com/twbs/bootstrap/pull/10951.
@@ -43,24 +43,35 @@
43
43
  // When fading in the modal, animate it to slide down
44
44
  .modal.fade & {
45
45
  @include transition($modal-transition);
46
- transform: translate(0, -25%);
46
+ transform: $modal-fade-transform;
47
47
  }
48
48
  .modal.show & {
49
- transform: translate(0, 0);
49
+ transform: $modal-show-transform;
50
+ }
51
+
52
+ // When trying to close, animate focus to scale
53
+ .modal.modal-static & {
54
+ transform: $modal-scale-transform;
55
+ }
56
+ }
57
+
58
+ .modal-dialog-scrollable {
59
+ height: subtract(100%, $modal-dialog-margin * 2);
60
+
61
+ .modal-content {
62
+ max-height: 100%;
63
+ overflow: hidden;
64
+ }
65
+
66
+ .modal-body {
67
+ overflow-y: auto;
50
68
  }
51
69
  }
52
70
 
53
71
  .modal-dialog-centered {
54
72
  display: flex;
55
73
  align-items: center;
56
- min-height: calc(100% - (#{$modal-dialog-margin} * 2));
57
-
58
- // Ensure `modal-dialog-centered` extends the full height of the view (IE10/11)
59
- &::before {
60
- display: block; // IE10
61
- height: calc(100vh - (#{$modal-dialog-margin} * 2));
62
- content: "";
63
- }
74
+ min-height: subtract(100%, $modal-dialog-margin * 2);
64
75
  }
65
76
 
66
77
  // Actual modal
@@ -70,6 +81,7 @@
70
81
  flex-direction: column;
71
82
  width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
72
83
  // counteract the pointer-events: none; in the .modal-dialog
84
+ color: $modal-content-color;
73
85
  pointer-events: auto;
74
86
  background-color: $modal-content-bg;
75
87
  background-clip: padding-box;
@@ -84,10 +96,10 @@
84
96
  .modal-backdrop {
85
97
  position: fixed;
86
98
  top: 0;
87
- right: 0;
88
- bottom: 0;
89
99
  left: 0;
90
100
  z-index: $zindex-modal-backdrop;
101
+ width: 100vw;
102
+ height: 100vh;
91
103
  background-color: $modal-backdrop-bg;
92
104
 
93
105
  // Fade for backdrop
@@ -99,16 +111,16 @@
99
111
  // Top section of the modal w/ title and dismiss
100
112
  .modal-header {
101
113
  display: flex;
102
- align-items: flex-start; // so the close btn always stays on the upper right corner
114
+ flex-shrink: 0;
115
+ align-items: center;
103
116
  justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
104
117
  padding: $modal-header-padding;
105
118
  border-bottom: $modal-header-border-width solid $modal-header-border-color;
106
- @include border-top-radius($modal-content-border-radius);
119
+ @include border-top-radius($modal-content-inner-border-radius);
107
120
 
108
- .close {
109
- padding: $modal-header-padding;
110
- // auto on the left force icon to the right even when there is no .modal-title
111
- margin: (-$modal-header-padding) (-$modal-header-padding) (-$modal-header-padding) auto;
121
+ .btn-close {
122
+ padding: ($modal-header-padding-y / 2) ($modal-header-padding-x / 2);
123
+ margin: ($modal-header-padding-y / -2) ($modal-header-padding-x / -2) ($modal-header-padding-y / -2) auto;
112
124
  }
113
125
  }
114
126
 
@@ -123,7 +135,7 @@
123
135
  .modal-body {
124
136
  position: relative;
125
137
  // Enable `flex-grow: 1` so that the body take up as much space as possible
126
- // when should there be a fixed height on `.modal-dialog`.
138
+ // when there should be a fixed height on `.modal-dialog`.
127
139
  flex: 1 1 auto;
128
140
  padding: $modal-inner-padding;
129
141
  }
@@ -131,23 +143,20 @@
131
143
  // Footer (for actions)
132
144
  .modal-footer {
133
145
  display: flex;
146
+ flex-wrap: wrap;
147
+ flex-shrink: 0;
134
148
  align-items: center; // vertically center
135
149
  justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
136
- padding: $modal-inner-padding;
150
+ padding: $modal-inner-padding - $modal-footer-margin-between / 2;
137
151
  border-top: $modal-footer-border-width solid $modal-footer-border-color;
152
+ @include border-bottom-radius($modal-content-inner-border-radius);
138
153
 
139
- // Easily place margin between footer elements
140
- > :not(:first-child) { margin-left: .25rem; }
141
- > :not(:last-child) { margin-right: .25rem; }
142
- }
143
-
144
- // Measure scrollbar width for padding body during modal show/hide
145
- .modal-scrollbar-measure {
146
- position: absolute;
147
- top: -9999px;
148
- width: 50px;
149
- height: 50px;
150
- overflow: scroll;
154
+ // Place margin between footer elements
155
+ // This solution is far from ideal because of the universal selector usage,
156
+ // but is needed to fix https://github.com/twbs/bootstrap/issues/24800
157
+ > * {
158
+ margin: $modal-footer-margin-between / 2;
159
+ }
151
160
  }
152
161
 
153
162
  // Scale up the modal
@@ -158,13 +167,12 @@
158
167
  margin: $modal-dialog-margin-y-sm-up auto;
159
168
  }
160
169
 
161
- .modal-dialog-centered {
162
- min-height: calc(100% - (#{$modal-dialog-margin-y-sm-up} * 2));
163
-
164
- &::before {
165
- height: calc(100vh - (#{$modal-dialog-margin-y-sm-up} * 2));
166
- }
170
+ .modal-dialog-scrollable {
171
+ height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
172
+ }
167
173
 
174
+ .modal-dialog-centered {
175
+ min-height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
168
176
  }
169
177
 
170
178
  .modal-content {
@@ -172,9 +180,49 @@
172
180
  }
173
181
 
174
182
  .modal-sm { max-width: $modal-sm; }
175
-
176
183
  }
177
184
 
178
185
  @include media-breakpoint-up(lg) {
179
- .modal-lg { max-width: $modal-lg; }
186
+ .modal-lg,
187
+ .modal-xl {
188
+ max-width: $modal-lg;
189
+ }
190
+ }
191
+
192
+ @include media-breakpoint-up(xl) {
193
+ .modal-xl { max-width: $modal-xl; }
194
+ }
195
+
196
+ // scss-docs-start modal-fullscreen-loop
197
+ @each $breakpoint in map-keys($grid-breakpoints) {
198
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
199
+ $postfix: if($infix != "", $infix + "-down", "");
200
+
201
+ @include media-breakpoint-down($breakpoint) {
202
+ .modal-fullscreen#{$postfix} {
203
+ width: 100vw;
204
+ max-width: none;
205
+ height: 100%;
206
+ margin: 0;
207
+
208
+ .modal-content {
209
+ height: 100%;
210
+ border: 0;
211
+ @include border-radius(0);
212
+ }
213
+
214
+ .modal-header {
215
+ @include border-radius(0);
216
+ }
217
+
218
+ .modal-body {
219
+ overflow-y: auto;
220
+ }
221
+
222
+ .modal-footer {
223
+ @include border-radius(0);
224
+ }
225
+ }
226
+ }
180
227
  }
228
+ // scss-docs-end modal-fullscreen-loop
@@ -1,7 +1,7 @@
1
1
  // Base class
2
2
  //
3
3
  // Kickstart any navigation component with a set of style resets. Works with
4
- // `<nav>`s or `<ul>`s.
4
+ // `<nav>`s, `<ul>`s or `<ol>`s.
5
5
 
6
6
  .nav {
7
7
  display: flex;
@@ -14,14 +14,23 @@
14
14
  .nav-link {
15
15
  display: block;
16
16
  padding: $nav-link-padding-y $nav-link-padding-x;
17
-
18
- @include hover-focus {
19
- text-decoration: none;
17
+ @include font-size($nav-link-font-size);
18
+ font-weight: $nav-link-font-weight;
19
+ color: $nav-link-color;
20
+ text-decoration: if($link-decoration == none, null, none);
21
+ @include transition($nav-link-transition);
22
+
23
+ &:hover,
24
+ &:focus {
25
+ color: $nav-link-hover-color;
26
+ text-decoration: if($link-hover-decoration == underline, none, null);
20
27
  }
21
28
 
22
29
  // Disabled state lightens text
23
30
  &.disabled {
24
31
  color: $nav-link-disabled-color;
32
+ pointer-events: none;
33
+ cursor: default;
25
34
  }
26
35
  }
27
36
 
@@ -32,16 +41,17 @@
32
41
  .nav-tabs {
33
42
  border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color;
34
43
 
35
- .nav-item {
36
- margin-bottom: -$nav-tabs-border-width;
37
- }
38
-
39
44
  .nav-link {
45
+ margin-bottom: -$nav-tabs-border-width;
46
+ background: none;
40
47
  border: $nav-tabs-border-width solid transparent;
41
48
  @include border-top-radius($nav-tabs-border-radius);
42
49
 
43
- @include hover-focus {
50
+ &:hover,
51
+ &:focus {
44
52
  border-color: $nav-tabs-link-hover-border-color;
53
+ // Prevents active .nav-link tab overlapping focus outline of previous/next .nav-link
54
+ isolation: isolate;
45
55
  }
46
56
 
47
57
  &.disabled {
@@ -73,13 +83,15 @@
73
83
 
74
84
  .nav-pills {
75
85
  .nav-link {
86
+ background: none;
87
+ border: 0;
76
88
  @include border-radius($nav-pills-border-radius);
77
89
  }
78
90
 
79
91
  .nav-link.active,
80
92
  .show > .nav-link {
81
93
  color: $nav-pills-link-active-color;
82
- background-color: $nav-pills-link-active-bg;
94
+ @include gradient-bg($nav-pills-link-active-bg);
83
95
  }
84
96
  }
85
97
 
@@ -89,6 +101,7 @@
89
101
  //
90
102
 
91
103
  .nav-fill {
104
+ > .nav-link,
92
105
  .nav-item {
93
106
  flex: 1 1 auto;
94
107
  text-align: center;
@@ -96,6 +109,7 @@
96
109
  }
97
110
 
98
111
  .nav-justified {
112
+ > .nav-link,
99
113
  .nav-item {
100
114
  flex-basis: 0;
101
115
  flex-grow: 1;
@@ -103,6 +117,13 @@
103
117
  }
104
118
  }
105
119
 
120
+ .nav-fill,
121
+ .nav-justified {
122
+ .nav-item .nav-link {
123
+ width: 100%; // Make sure button will grow
124
+ }
125
+ }
126
+
106
127
 
107
128
  // Tabbable tabs
108
129
  //
@@ -4,7 +4,6 @@
4
4
  // Navbar brand
5
5
  // Navbar nav
6
6
  // Navbar text
7
- // Navbar divider
8
7
  // Responsive navbar
9
8
  // Navbar position
10
9
  // Navbar themes
@@ -21,17 +20,32 @@
21
20
  flex-wrap: wrap; // allow us to do the line break for collapsing content
22
21
  align-items: center;
23
22
  justify-content: space-between; // space out brand from logo
24
- padding: $navbar-padding-y $navbar-padding-x;
23
+ padding-top: $navbar-padding-y;
24
+ padding-right: $navbar-padding-x; // default: null
25
+ padding-bottom: $navbar-padding-y;
26
+ padding-left: $navbar-padding-x; // default: null
27
+ @include gradient-bg();
25
28
 
26
29
  // Because flex properties aren't inherited, we need to redeclare these first
27
30
  // few properties so that content nested within behave properly.
28
- > .container,
29
- > .container-fluid {
31
+ // The `flex-wrap` property is inherited to simplify the expanded navbars
32
+ %container-flex-properties {
30
33
  display: flex;
31
- flex-wrap: wrap;
34
+ flex-wrap: inherit;
32
35
  align-items: center;
33
36
  justify-content: space-between;
34
37
  }
38
+
39
+ > .container,
40
+ > .container-fluid {
41
+ @extend %container-flex-properties;
42
+ }
43
+
44
+ @each $breakpoint, $container-max-width in $container-max-widths {
45
+ > .container#{breakpoint-infix($breakpoint, $container-max-widths)} {
46
+ @extend %container-flex-properties;
47
+ }
48
+ }
35
49
  }
36
50
 
37
51
 
@@ -40,16 +54,16 @@
40
54
  // Used for brand, project, or site names.
41
55
 
42
56
  .navbar-brand {
43
- display: inline-block;
44
57
  padding-top: $navbar-brand-padding-y;
45
58
  padding-bottom: $navbar-brand-padding-y;
46
- margin-right: $navbar-padding-x;
47
- font-size: $navbar-brand-font-size;
48
- line-height: inherit;
59
+ margin-right: $navbar-brand-margin-end;
60
+ @include font-size($navbar-brand-font-size);
61
+ text-decoration: if($link-decoration == none, null, none);
49
62
  white-space: nowrap;
50
63
 
51
- @include hover-focus {
52
- text-decoration: none;
64
+ &:hover,
65
+ &:focus {
66
+ text-decoration: if($link-hover-decoration == underline, none, null);
53
67
  }
54
68
  }
55
69
 
@@ -72,7 +86,6 @@
72
86
 
73
87
  .dropdown-menu {
74
88
  position: static;
75
- float: none;
76
89
  }
77
90
  }
78
91
 
@@ -82,7 +95,6 @@
82
95
  //
83
96
 
84
97
  .navbar-text {
85
- display: inline-block;
86
98
  padding-top: $nav-link-padding-y;
87
99
  padding-bottom: $nav-link-padding-y;
88
100
  }
@@ -107,19 +119,21 @@
107
119
  // Button for toggling the navbar when in its collapsed state
108
120
  .navbar-toggler {
109
121
  padding: $navbar-toggler-padding-y $navbar-toggler-padding-x;
110
- font-size: $navbar-toggler-font-size;
122
+ @include font-size($navbar-toggler-font-size);
111
123
  line-height: 1;
112
124
  background-color: transparent; // remove default button style
113
125
  border: $border-width solid transparent; // remove default button style
114
126
  @include border-radius($navbar-toggler-border-radius);
127
+ @include transition($navbar-toggler-transition);
115
128
 
116
- @include hover-focus {
129
+ &:hover {
117
130
  text-decoration: none;
118
131
  }
119
132
 
120
- // Opinionated: add "hand" cursor to non-disabled .navbar-toggler elements
121
- &:not(:disabled):not(.disabled) {
122
- cursor: pointer;
133
+ &:focus {
134
+ text-decoration: none;
135
+ outline: 0;
136
+ box-shadow: 0 0 0 $navbar-toggler-focus-width;
123
137
  }
124
138
  }
125
139
 
@@ -130,11 +144,17 @@
130
144
  width: 1.5em;
131
145
  height: 1.5em;
132
146
  vertical-align: middle;
133
- content: "";
134
- background: no-repeat center center;
135
- background-size: 100% 100%;
147
+ background-repeat: no-repeat;
148
+ background-position: center;
149
+ background-size: 100%;
136
150
  }
137
151
 
152
+ .navbar-nav-scroll {
153
+ max-height: var(--#{$variable-prefix}scroll-height, 75vh);
154
+ overflow-y: auto;
155
+ }
156
+
157
+ // scss-docs-start navbar-expand-loop
138
158
  // Generate series of `.navbar-expand-*` responsive classes for configuring
139
159
  // where your navbar collapses.
140
160
  .navbar-expand {
@@ -142,17 +162,10 @@
142
162
  $next: breakpoint-next($breakpoint, $grid-breakpoints);
143
163
  $infix: breakpoint-infix($next, $grid-breakpoints);
144
164
 
165
+ // stylelint-disable-next-line scss/selector-no-union-class-name
145
166
  &#{$infix} {
146
- @include media-breakpoint-down($breakpoint) {
147
- > .container,
148
- > .container-fluid {
149
- padding-right: 0;
150
- padding-left: 0;
151
- }
152
- }
153
-
154
167
  @include media-breakpoint-up($next) {
155
- flex-flow: row nowrap;
168
+ flex-wrap: nowrap;
156
169
  justify-content: flex-start;
157
170
 
158
171
  .navbar-nav {
@@ -168,16 +181,12 @@
168
181
  }
169
182
  }
170
183
 
171
- // For nesting containers, have to redeclare for alignment purposes
172
- > .container,
173
- > .container-fluid {
174
- flex-wrap: nowrap;
184
+ .navbar-nav-scroll {
185
+ overflow: visible;
175
186
  }
176
187
 
177
188
  .navbar-collapse {
178
- display: flex !important; // stylelint-disable-line declaration-no-important
179
-
180
- // Changes flex-bases to auto because of an IE10 bug
189
+ display: flex !important; // stylelint-disable-line declaration-no-important
181
190
  flex-basis: auto;
182
191
  }
183
192
 
@@ -188,6 +197,7 @@
188
197
  }
189
198
  }
190
199
  }
200
+ // scss-docs-end navbar-expand-loop
191
201
 
192
202
 
193
203
  // Navbar themes
@@ -197,10 +207,11 @@
197
207
  // Dark links against a light background
198
208
  .navbar-light {
199
209
  .navbar-brand {
200
- color: $navbar-light-active-color;
210
+ color: $navbar-light-brand-color;
201
211
 
202
- @include hover-focus {
203
- color: $navbar-light-active-color;
212
+ &:hover,
213
+ &:focus {
214
+ color: $navbar-light-brand-hover-color;
204
215
  }
205
216
  }
206
217
 
@@ -208,7 +219,8 @@
208
219
  .nav-link {
209
220
  color: $navbar-light-color;
210
221
 
211
- @include hover-focus {
222
+ &:hover,
223
+ &:focus {
212
224
  color: $navbar-light-hover-color;
213
225
  }
214
226
 
@@ -218,8 +230,6 @@
218
230
  }
219
231
 
220
232
  .show > .nav-link,
221
- .active > .nav-link,
222
- .nav-link.show,
223
233
  .nav-link.active {
224
234
  color: $navbar-light-active-color;
225
235
  }
@@ -231,17 +241,16 @@
231
241
  }
232
242
 
233
243
  .navbar-toggler-icon {
234
- background-image: $navbar-light-toggler-icon-bg;
244
+ background-image: escape-svg($navbar-light-toggler-icon-bg);
235
245
  }
236
246
 
237
247
  .navbar-text {
238
248
  color: $navbar-light-color;
239
- a {
240
- color: $navbar-light-active-color;
241
249
 
242
- @include hover-focus {
243
- color: $navbar-light-active-color;
244
- }
250
+ a,
251
+ a:hover,
252
+ a:focus {
253
+ color: $navbar-light-active-color;
245
254
  }
246
255
  }
247
256
  }
@@ -249,10 +258,11 @@
249
258
  // White links against a dark background
250
259
  .navbar-dark {
251
260
  .navbar-brand {
252
- color: $navbar-dark-active-color;
261
+ color: $navbar-dark-brand-color;
253
262
 
254
- @include hover-focus {
255
- color: $navbar-dark-active-color;
263
+ &:hover,
264
+ &:focus {
265
+ color: $navbar-dark-brand-hover-color;
256
266
  }
257
267
  }
258
268
 
@@ -260,7 +270,8 @@
260
270
  .nav-link {
261
271
  color: $navbar-dark-color;
262
272
 
263
- @include hover-focus {
273
+ &:hover,
274
+ &:focus {
264
275
  color: $navbar-dark-hover-color;
265
276
  }
266
277
 
@@ -270,8 +281,6 @@
270
281
  }
271
282
 
272
283
  .show > .nav-link,
273
- .active > .nav-link,
274
- .nav-link.show,
275
284
  .nav-link.active {
276
285
  color: $navbar-dark-active-color;
277
286
  }
@@ -283,17 +292,15 @@
283
292
  }
284
293
 
285
294
  .navbar-toggler-icon {
286
- background-image: $navbar-dark-toggler-icon-bg;
295
+ background-image: escape-svg($navbar-dark-toggler-icon-bg);
287
296
  }
288
297
 
289
298
  .navbar-text {
290
299
  color: $navbar-dark-color;
291
- a {
300
+ a,
301
+ a:hover,
302
+ a:focus {
292
303
  color: $navbar-dark-active-color;
293
-
294
- @include hover-focus {
295
- color: $navbar-dark-active-color;
296
- }
297
304
  }
298
305
  }
299
306
  }
@@ -0,0 +1,77 @@
1
+ .offcanvas {
2
+ position: fixed;
3
+ bottom: 0;
4
+ z-index: $zindex-offcanvas;
5
+ display: flex;
6
+ flex-direction: column;
7
+ max-width: 100%;
8
+ color: $offcanvas-color;
9
+ visibility: hidden;
10
+ background-color: $offcanvas-bg-color;
11
+ background-clip: padding-box;
12
+ outline: 0;
13
+ @include box-shadow($offcanvas-box-shadow);
14
+ @include transition(transform $offcanvas-transition-duration ease-in-out);
15
+ }
16
+
17
+ .offcanvas-header {
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: space-between;
21
+ padding: $offcanvas-padding-y $offcanvas-padding-x;
22
+
23
+ .btn-close {
24
+ padding: ($offcanvas-padding-y / 2) ($offcanvas-padding-x / 2);
25
+ margin: ($offcanvas-padding-y / -2) ($offcanvas-padding-x / -2) ($offcanvas-padding-y / -2) auto;
26
+ }
27
+ }
28
+
29
+ .offcanvas-title {
30
+ margin-bottom: 0;
31
+ line-height: $offcanvas-title-line-height;
32
+ }
33
+
34
+ .offcanvas-body {
35
+ flex-grow: 1;
36
+ padding: $offcanvas-padding-y $offcanvas-padding-x;
37
+ overflow-y: auto;
38
+ }
39
+
40
+ .offcanvas-start {
41
+ top: 0;
42
+ left: 0;
43
+ width: $offcanvas-horizontal-width;
44
+ border-right: $offcanvas-border-width solid $offcanvas-border-color;
45
+ transform: translateX(-100%);
46
+ }
47
+
48
+ .offcanvas-end {
49
+ top: 0;
50
+ right: 0;
51
+ width: $offcanvas-horizontal-width;
52
+ border-left: $offcanvas-border-width solid $offcanvas-border-color;
53
+ transform: translateX(100%);
54
+ }
55
+
56
+ .offcanvas-top {
57
+ top: 0;
58
+ right: 0;
59
+ left: 0;
60
+ height: $offcanvas-vertical-height;
61
+ max-height: 100%;
62
+ border-bottom: $offcanvas-border-width solid $offcanvas-border-color;
63
+ transform: translateY(-100%);
64
+ }
65
+
66
+ .offcanvas-bottom {
67
+ right: 0;
68
+ left: 0;
69
+ height: $offcanvas-vertical-height;
70
+ max-height: 100%;
71
+ border-top: $offcanvas-border-width solid $offcanvas-border-color;
72
+ transform: translateY(100%);
73
+ }
74
+
75
+ .offcanvas.show {
76
+ transform: none;
77
+ }