bootstrap 4.4.1 → 5.0.0.alpha2

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 (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
@@ -1,42 +1,3 @@
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
- @include make-container();
9
- @include make-container-max-widths();
10
- }
11
-
12
- // 100% wide container at all breakpoints
13
- .container-fluid {
14
- @include make-container();
15
- }
16
-
17
- // Responsive containers that are 100% wide until a breakpoint
18
- @each $breakpoint, $container-max-width in $container-max-widths {
19
- .container-#{$breakpoint} {
20
- @extend .container-fluid;
21
- }
22
-
23
- @include media-breakpoint-up($breakpoint, $grid-breakpoints) {
24
- %responsive-container-#{$breakpoint} {
25
- max-width: $container-max-width;
26
- }
27
-
28
- @each $name, $width in $grid-breakpoints {
29
- @if ($container-max-width > $width or $breakpoint == $name) {
30
- .container#{breakpoint-infix($name, $grid-breakpoints)} {
31
- @extend %responsive-container-#{$breakpoint};
32
- }
33
- }
34
- }
35
- }
36
- }
37
- }
38
-
39
-
40
1
  // Row
41
2
  //
42
3
  // Rows contain your columns.
@@ -44,22 +5,14 @@
44
5
  @if $enable-grid-classes {
45
6
  .row {
46
7
  @include make-row();
47
- }
48
8
 
49
- // Remove the negative margin from default .row, then the horizontal padding
50
- // from all immediate children columns (to prevent runaway style inheritance).
51
- .no-gutters {
52
- margin-right: 0;
53
- margin-left: 0;
54
-
55
- > .col,
56
- > [class*="col-"] {
57
- padding-right: 0;
58
- padding-left: 0;
9
+ > * {
10
+ @include make-col-ready();
59
11
  }
60
12
  }
61
13
  }
62
14
 
15
+
63
16
  // Columns
64
17
  //
65
18
  // Common styles for small and large grid columns
@@ -0,0 +1,7 @@
1
+ @import "helpers/clearfix";
2
+ @import "helpers/colored-links";
3
+ @import "helpers/ratio";
4
+ @import "helpers/position";
5
+ @import "helpers/visually-hidden";
6
+ @import "helpers/stretched-link";
7
+ @import "helpers/text-truncation";
@@ -9,6 +9,7 @@
9
9
  // No need to set list-style: none; since .list-group-item is block level
10
10
  padding-left: 0; // reset padding because ul and ol
11
11
  margin-bottom: 0;
12
+ @include border-radius($list-group-border-radius);
12
13
  }
13
14
 
14
15
 
@@ -23,7 +24,8 @@
23
24
  text-align: inherit; // For `<button>`s (anchors inherit)
24
25
 
25
26
  // Hover state
26
- @include hover-focus() {
27
+ &:hover,
28
+ &:focus {
27
29
  z-index: 1; // Place hover/focus items above their siblings for proper border styling
28
30
  color: $list-group-action-hover-color;
29
31
  text-decoration: none;
@@ -46,15 +48,16 @@
46
48
  display: block;
47
49
  padding: $list-group-item-padding-y $list-group-item-padding-x;
48
50
  color: $list-group-color;
51
+ text-decoration: if($link-decoration == none, null, none);
49
52
  background-color: $list-group-bg;
50
53
  border: $list-group-border-width solid $list-group-border-color;
51
54
 
52
55
  &:first-child {
53
- @include border-top-radius($list-group-border-radius);
56
+ @include border-top-radius(inherit);
54
57
  }
55
58
 
56
59
  &:last-child {
57
- @include border-bottom-radius($list-group-border-radius);
60
+ @include border-bottom-radius(inherit);
58
61
  }
59
62
 
60
63
  &.disabled,
@@ -94,7 +97,7 @@
94
97
  .list-group-horizontal#{$infix} {
95
98
  flex-direction: row;
96
99
 
97
- .list-group-item {
100
+ > .list-group-item {
98
101
  &:first-child {
99
102
  @include border-bottom-left-radius($list-group-border-radius);
100
103
  @include border-top-right-radius(0);
@@ -109,7 +112,7 @@
109
112
  margin-top: 0;
110
113
  }
111
114
 
112
- & + .list-group-item {
115
+ + .list-group-item {
113
116
  border-top-width: $list-group-border-width;
114
117
  border-left-width: 0;
115
118
 
@@ -130,29 +133,25 @@
130
133
  // useful within other components (e.g., cards).
131
134
 
132
135
  .list-group-flush {
133
- .list-group-item {
134
- border-right-width: 0;
135
- border-left-width: 0;
136
- @include border-radius(0);
136
+ @include border-radius(0);
137
137
 
138
- &:first-child {
139
- border-top-width: 0;
140
- }
141
- }
138
+ > .list-group-item {
139
+ border-width: 0 0 $list-group-border-width;
142
140
 
143
- &:last-child {
144
- .list-group-item:last-child {
141
+ &:last-child {
145
142
  border-bottom-width: 0;
146
143
  }
147
144
  }
148
145
  }
149
146
 
150
147
 
151
- // Contextual variants
148
+ // scss-docs-start list-group-modifiers
149
+ // List group contextual variants
152
150
  //
153
151
  // Add modifier classes to change text and background color on individual items.
154
152
  // Organizationally, this must come after the `:hover` states.
155
153
 
156
154
  @each $color, $value in $theme-colors {
157
- @include list-group-item-variant($color, theme-color-level($color, -9), theme-color-level($color, 6));
155
+ @include list-group-item-variant($color, color-level($value, $list-group-item-bg-level), color-level($value, $list-group-item-color-level));
158
156
  }
157
+ // scss-docs-end list-group-modifiers
@@ -8,19 +8,16 @@
8
8
  // Deprecate
9
9
  @import "mixins/deprecate";
10
10
 
11
- // Utilities
11
+ // Helpers
12
12
  @import "mixins/breakpoints";
13
- @import "mixins/hover";
14
13
  @import "mixins/image";
15
- @import "mixins/badge";
16
14
  @import "mixins/resize";
17
- @import "mixins/screen-reader";
18
- @import "mixins/size";
15
+ @import "mixins/visually-hidden";
19
16
  @import "mixins/reset-text";
20
- @import "mixins/text-emphasis";
21
- @import "mixins/text-hide";
22
17
  @import "mixins/text-truncate";
23
- @import "mixins/visibility";
18
+
19
+ // Utilities
20
+ @import "mixins/utilities";
24
21
 
25
22
  // Components
26
23
  @import "mixins/alert";
@@ -29,12 +26,10 @@
29
26
  @import "mixins/pagination";
30
27
  @import "mixins/lists";
31
28
  @import "mixins/list-group";
32
- @import "mixins/nav-divider";
33
29
  @import "mixins/forms";
34
- @import "mixins/table-row";
30
+ @import "mixins/table-variants";
35
31
 
36
32
  // Skins
37
- @import "mixins/background-variant";
38
33
  @import "mixins/border-radius";
39
34
  @import "mixins/box-shadow";
40
35
  @import "mixins/gradients";
@@ -42,6 +37,5 @@
42
37
 
43
38
  // Layout
44
39
  @import "mixins/clearfix";
45
- @import "mixins/grid-framework";
40
+ @import "mixins/container";
46
41
  @import "mixins/grid";
47
- @import "mixins/float";
@@ -56,19 +56,13 @@
56
56
  }
57
57
 
58
58
  .modal-dialog-scrollable {
59
- display: flex; // IE10/11
60
- max-height: subtract(100%, $modal-dialog-margin * 2);
59
+ height: subtract(100%, $modal-dialog-margin * 2);
61
60
 
62
61
  .modal-content {
63
- max-height: subtract(100vh, $modal-dialog-margin * 2); // IE10/11
62
+ max-height: 100%;
64
63
  overflow: hidden;
65
64
  }
66
65
 
67
- .modal-header,
68
- .modal-footer {
69
- flex-shrink: 0;
70
- }
71
-
72
66
  .modal-body {
73
67
  overflow-y: auto;
74
68
  }
@@ -78,28 +72,6 @@
78
72
  display: flex;
79
73
  align-items: center;
80
74
  min-height: subtract(100%, $modal-dialog-margin * 2);
81
-
82
- // Ensure `modal-dialog-centered` extends the full height of the view (IE10/11)
83
- &::before {
84
- display: block; // IE10
85
- height: subtract(100vh, $modal-dialog-margin * 2);
86
- content: "";
87
- }
88
-
89
- // Ensure `.modal-body` shows scrollbar (IE10/11)
90
- &.modal-dialog-scrollable {
91
- flex-direction: column;
92
- justify-content: center;
93
- height: 100%;
94
-
95
- .modal-content {
96
- max-height: none;
97
- }
98
-
99
- &::before {
100
- content: none;
101
- }
102
- }
103
75
  }
104
76
 
105
77
  // Actual modal
@@ -139,16 +111,16 @@
139
111
  // Top section of the modal w/ title and dismiss
140
112
  .modal-header {
141
113
  display: flex;
142
- align-items: flex-start; // so the close btn always stays on the upper right corner
114
+ flex-shrink: 0;
115
+ align-items: center;
143
116
  justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
144
117
  padding: $modal-header-padding;
145
118
  border-bottom: $modal-header-border-width solid $modal-header-border-color;
146
119
  @include border-top-radius($modal-content-inner-border-radius);
147
120
 
148
- .close {
149
- padding: $modal-header-padding;
150
- // auto on the left force icon to the right even when there is no .modal-title
151
- margin: (-$modal-header-padding-y) (-$modal-header-padding-x) (-$modal-header-padding-y) 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;
152
124
  }
153
125
  }
154
126
 
@@ -172,6 +144,7 @@
172
144
  .modal-footer {
173
145
  display: flex;
174
146
  flex-wrap: wrap;
147
+ flex-shrink: 0;
175
148
  align-items: center; // vertically center
176
149
  justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
177
150
  padding: $modal-inner-padding - $modal-footer-margin-between / 2;
@@ -181,7 +154,6 @@
181
154
  // Place margin between footer elements
182
155
  // This solution is far from ideal because of the universal selector usage,
183
156
  // but is needed to fix https://github.com/twbs/bootstrap/issues/24800
184
- // stylelint-disable-next-line selector-max-universal
185
157
  > * {
186
158
  margin: $modal-footer-margin-between / 2;
187
159
  }
@@ -205,19 +177,11 @@
205
177
  }
206
178
 
207
179
  .modal-dialog-scrollable {
208
- max-height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
209
-
210
- .modal-content {
211
- max-height: subtract(100vh, $modal-dialog-margin-y-sm-up * 2);
212
- }
180
+ height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
213
181
  }
214
182
 
215
183
  .modal-dialog-centered {
216
184
  min-height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
217
-
218
- &::before {
219
- height: subtract(100vh, $modal-dialog-margin-y-sm-up * 2);
220
- }
221
185
  }
222
186
 
223
187
  .modal-content {
@@ -237,3 +201,35 @@
237
201
  @include media-breakpoint-up(xl) {
238
202
  .modal-xl { max-width: $modal-xl; }
239
203
  }
204
+
205
+ @each $breakpoint in map-keys($grid-breakpoints) {
206
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
207
+ $postfix: if($infix != "", $infix + "-down", "");
208
+
209
+ @include media-breakpoint-down($breakpoint) {
210
+ .modal-fullscreen#{$postfix} {
211
+ width: 100vw;
212
+ max-width: none;
213
+ height: 100%;
214
+ margin: 0;
215
+
216
+ .modal-content {
217
+ height: 100%;
218
+ border: 0;
219
+ @include border-radius(0);
220
+ }
221
+
222
+ .modal-header {
223
+ @include border-radius(0);
224
+ }
225
+
226
+ .modal-body {
227
+ overflow-y: auto;
228
+ }
229
+
230
+ .modal-footer {
231
+ @include border-radius(0);
232
+ }
233
+ }
234
+ }
235
+ }
@@ -14,9 +14,16 @@
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
@@ -34,15 +41,13 @@
34
41
  .nav-tabs {
35
42
  border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color;
36
43
 
37
- .nav-item {
38
- margin-bottom: -$nav-tabs-border-width;
39
- }
40
-
41
44
  .nav-link {
45
+ margin-bottom: -$nav-tabs-border-width;
42
46
  border: $nav-tabs-border-width solid transparent;
43
47
  @include border-top-radius($nav-tabs-border-radius);
44
48
 
45
- @include hover-focus() {
49
+ &:hover,
50
+ &:focus {
46
51
  border-color: $nav-tabs-link-hover-border-color;
47
52
  }
48
53
 
@@ -81,7 +86,7 @@
81
86
  .nav-link.active,
82
87
  .show > .nav-link {
83
88
  color: $nav-pills-link-active-color;
84
- background-color: $nav-pills-link-active-bg;
89
+ @include gradient-bg($nav-pills-link-active-bg);
85
90
  }
86
91
  }
87
92
 
@@ -91,6 +96,7 @@
91
96
  //
92
97
 
93
98
  .nav-fill {
99
+ > .nav-link,
94
100
  .nav-item {
95
101
  flex: 1 1 auto;
96
102
  text-align: center;
@@ -98,6 +104,7 @@
98
104
  }
99
105
 
100
106
  .nav-justified {
107
+ > .nav-link,
101
108
  .nav-item {
102
109
  flex-basis: 0;
103
110
  flex-grow: 1;
@@ -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,19 +20,24 @@
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.
31
+ // The `flex-wrap` property is inherited to simplify the expanded navbars
28
32
  %container-flex-properties {
29
33
  display: flex;
30
- flex-wrap: wrap;
34
+ flex-wrap: inherit;
31
35
  align-items: center;
32
36
  justify-content: space-between;
33
37
  }
34
38
 
35
- .container,
36
- .container-fluid {
39
+ > .container,
40
+ > .container-fluid {
37
41
  @extend %container-flex-properties;
38
42
  }
39
43
 
@@ -50,16 +54,16 @@
50
54
  // Used for brand, project, or site names.
51
55
 
52
56
  .navbar-brand {
53
- display: inline-block;
54
57
  padding-top: $navbar-brand-padding-y;
55
58
  padding-bottom: $navbar-brand-padding-y;
56
- margin-right: $navbar-padding-x;
59
+ margin-right: $navbar-brand-margin-right;
57
60
  @include font-size($navbar-brand-font-size);
58
- line-height: inherit;
61
+ text-decoration: if($link-decoration == none, null, none);
59
62
  white-space: nowrap;
60
63
 
61
- @include hover-focus() {
62
- text-decoration: none;
64
+ &:hover,
65
+ &:focus {
66
+ text-decoration: if($link-hover-decoration == underline, none, null);
63
67
  }
64
68
  }
65
69
 
@@ -82,7 +86,6 @@
82
86
 
83
87
  .dropdown-menu {
84
88
  position: static;
85
- float: none;
86
89
  }
87
90
  }
88
91
 
@@ -92,7 +95,6 @@
92
95
  //
93
96
 
94
97
  .navbar-text {
95
- display: inline-block;
96
98
  padding-top: $nav-link-padding-y;
97
99
  padding-bottom: $nav-link-padding-y;
98
100
  }
@@ -107,11 +109,10 @@
107
109
  // the default flexbox row orientation. Requires the use of `flex-wrap: wrap`
108
110
  // on the `.navbar` parent.
109
111
  .navbar-collapse {
110
- flex-basis: 100%;
111
- flex-grow: 1;
112
112
  // For always expanded or extra full navbars, ensure content aligns itself
113
113
  // properly vertically. Can be easily overridden with flex utilities.
114
114
  align-items: center;
115
+ width: 100%;
115
116
  }
116
117
 
117
118
  // Button for toggling the navbar when in its collapsed state
@@ -122,10 +123,17 @@
122
123
  background-color: transparent; // remove default button style
123
124
  border: $border-width solid transparent; // remove default button style
124
125
  @include border-radius($navbar-toggler-border-radius);
126
+ @include transition($navbar-toggler-transition);
125
127
 
126
- @include hover-focus() {
128
+ &:hover {
127
129
  text-decoration: none;
128
130
  }
131
+
132
+ &:focus {
133
+ text-decoration: none;
134
+ outline: 0;
135
+ box-shadow: 0 0 0 $navbar-toggler-focus-width;
136
+ }
129
137
  }
130
138
 
131
139
  // Keep as a separate element so folks can easily override it with another icon
@@ -135,9 +143,9 @@
135
143
  width: 1.5em;
136
144
  height: 1.5em;
137
145
  vertical-align: middle;
138
- content: "";
139
- background: no-repeat center center;
140
- background-size: 100% 100%;
146
+ background-repeat: no-repeat;
147
+ background-position: center;
148
+ background-size: 100%;
141
149
  }
142
150
 
143
151
  // Generate series of `.navbar-expand-*` responsive classes for configuring
@@ -147,27 +155,10 @@
147
155
  $next: breakpoint-next($breakpoint, $grid-breakpoints);
148
156
  $infix: breakpoint-infix($next, $grid-breakpoints);
149
157
 
158
+ // stylelint-disable-next-line scss/selector-no-union-class-name
150
159
  &#{$infix} {
151
- @include media-breakpoint-down($breakpoint) {
152
- %container-navbar-expand-#{$breakpoint} {
153
- padding-right: 0;
154
- padding-left: 0;
155
- }
156
-
157
- > .container,
158
- > .container-fluid {
159
- @extend %container-navbar-expand-#{$breakpoint};
160
- }
161
-
162
- @each $size, $container-max-width in $container-max-widths {
163
- > .container#{breakpoint-infix($size, $container-max-widths)} {
164
- @extend %container-navbar-expand-#{$breakpoint};
165
- }
166
- }
167
- }
168
-
169
160
  @include media-breakpoint-up($next) {
170
- flex-flow: row nowrap;
161
+ flex-wrap: nowrap;
171
162
  justify-content: flex-start;
172
163
 
173
164
  .navbar-nav {
@@ -183,27 +174,8 @@
183
174
  }
184
175
  }
185
176
 
186
- // For nesting containers, have to redeclare for alignment purposes
187
- %container-nesting-#{$breakpoint} {
188
- flex-wrap: nowrap;
189
- }
190
-
191
- > .container,
192
- > .container-fluid {
193
- @extend %container-nesting-#{$breakpoint};
194
- }
195
-
196
- @each $size, $container-max-width in $container-max-widths {
197
- > .container#{breakpoint-infix($size, $container-max-widths)} {
198
- @extend %container-nesting-#{$breakpoint};
199
- }
200
- }
201
-
202
177
  .navbar-collapse {
203
178
  display: flex !important; // stylelint-disable-line declaration-no-important
204
-
205
- // Changes flex-bases to auto because of an IE10 bug
206
- flex-basis: auto;
207
179
  }
208
180
 
209
181
  .navbar-toggler {
@@ -224,7 +196,8 @@
224
196
  .navbar-brand {
225
197
  color: $navbar-light-brand-color;
226
198
 
227
- @include hover-focus() {
199
+ &:hover,
200
+ &:focus {
228
201
  color: $navbar-light-brand-hover-color;
229
202
  }
230
203
  }
@@ -233,7 +206,8 @@
233
206
  .nav-link {
234
207
  color: $navbar-light-color;
235
208
 
236
- @include hover-focus() {
209
+ &:hover,
210
+ &:focus {
237
211
  color: $navbar-light-hover-color;
238
212
  }
239
213
 
@@ -243,8 +217,6 @@
243
217
  }
244
218
 
245
219
  .show > .nav-link,
246
- .active > .nav-link,
247
- .nav-link.show,
248
220
  .nav-link.active {
249
221
  color: $navbar-light-active-color;
250
222
  }
@@ -261,12 +233,11 @@
261
233
 
262
234
  .navbar-text {
263
235
  color: $navbar-light-color;
264
- a {
265
- color: $navbar-light-active-color;
266
236
 
267
- @include hover-focus() {
268
- color: $navbar-light-active-color;
269
- }
237
+ a,
238
+ a:hover,
239
+ a:focus {
240
+ color: $navbar-light-active-color;
270
241
  }
271
242
  }
272
243
  }
@@ -276,7 +247,8 @@
276
247
  .navbar-brand {
277
248
  color: $navbar-dark-brand-color;
278
249
 
279
- @include hover-focus() {
250
+ &:hover,
251
+ &:focus {
280
252
  color: $navbar-dark-brand-hover-color;
281
253
  }
282
254
  }
@@ -285,7 +257,8 @@
285
257
  .nav-link {
286
258
  color: $navbar-dark-color;
287
259
 
288
- @include hover-focus() {
260
+ &:hover,
261
+ &:focus {
289
262
  color: $navbar-dark-hover-color;
290
263
  }
291
264
 
@@ -295,8 +268,6 @@
295
268
  }
296
269
 
297
270
  .show > .nav-link,
298
- .active > .nav-link,
299
- .nav-link.show,
300
271
  .nav-link.active {
301
272
  color: $navbar-dark-active-color;
302
273
  }
@@ -313,12 +284,10 @@
313
284
 
314
285
  .navbar-text {
315
286
  color: $navbar-dark-color;
316
- a {
287
+ a,
288
+ a:hover,
289
+ a:focus {
317
290
  color: $navbar-dark-active-color;
318
-
319
- @include hover-focus() {
320
- color: $navbar-dark-active-color;
321
- }
322
291
  }
323
292
  }
324
293
  }