bootstrap 5.2.2 → 5.3.3

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 (105) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +61 -0
  3. data/CHANGELOG.md +4 -0
  4. data/Gemfile +1 -0
  5. data/README.md +9 -3
  6. data/Rakefile +17 -4
  7. data/assets/javascripts/bootstrap/alert.js +22 -32
  8. data/assets/javascripts/bootstrap/base-component.js +22 -38
  9. data/assets/javascripts/bootstrap/button.js +19 -22
  10. data/assets/javascripts/bootstrap/carousel.js +52 -135
  11. data/assets/javascripts/bootstrap/collapse.js +40 -102
  12. data/assets/javascripts/bootstrap/dom/data.js +8 -12
  13. data/assets/javascripts/bootstrap/dom/event-handler.js +19 -66
  14. data/assets/javascripts/bootstrap/dom/manipulator.js +4 -17
  15. data/assets/javascripts/bootstrap/dom/selector-engine.js +42 -24
  16. data/assets/javascripts/bootstrap/dropdown.js +74 -145
  17. data/assets/javascripts/bootstrap/modal.js +53 -133
  18. data/assets/javascripts/bootstrap/offcanvas.js +50 -102
  19. data/assets/javascripts/bootstrap/popover.js +23 -29
  20. data/assets/javascripts/bootstrap/scrollspy.js +53 -90
  21. data/assets/javascripts/bootstrap/tab.js +63 -112
  22. data/assets/javascripts/bootstrap/toast.js +31 -73
  23. data/assets/javascripts/bootstrap/tooltip.js +80 -191
  24. data/assets/javascripts/bootstrap/util/backdrop.js +27 -54
  25. data/assets/javascripts/bootstrap/util/component-functions.js +13 -18
  26. data/assets/javascripts/bootstrap/util/config.js +15 -27
  27. data/assets/javascripts/bootstrap/util/focustrap.js +19 -36
  28. data/assets/javascripts/bootstrap/util/index.js +42 -112
  29. data/assets/javascripts/bootstrap/util/sanitizer.js +33 -42
  30. data/assets/javascripts/bootstrap/util/scrollbar.js +24 -50
  31. data/assets/javascripts/bootstrap/util/swipe.js +27 -48
  32. data/assets/javascripts/bootstrap/util/template-factory.js +25 -52
  33. data/assets/javascripts/bootstrap-sprockets.js +8 -8
  34. data/assets/javascripts/bootstrap.js +686 -1450
  35. data/assets/javascripts/bootstrap.min.js +3 -3
  36. data/assets/stylesheets/_bootstrap-grid.scss +1 -3
  37. data/assets/stylesheets/_bootstrap-reboot.scss +1 -0
  38. data/assets/stylesheets/_bootstrap-utilities.scss +19 -0
  39. data/assets/stylesheets/_bootstrap.scss +1 -0
  40. data/assets/stylesheets/bootstrap/_accordion.scss +20 -11
  41. data/assets/stylesheets/bootstrap/_alert.scss +8 -11
  42. data/assets/stylesheets/bootstrap/_button-group.scss +2 -2
  43. data/assets/stylesheets/bootstrap/_buttons.scss +12 -3
  44. data/assets/stylesheets/bootstrap/_card.scss +5 -0
  45. data/assets/stylesheets/bootstrap/_carousel.scss +22 -15
  46. data/assets/stylesheets/bootstrap/_close.scss +32 -9
  47. data/assets/stylesheets/bootstrap/_dropdown.scss +1 -0
  48. data/assets/stylesheets/bootstrap/_functions.scss +2 -2
  49. data/assets/stylesheets/bootstrap/_grid.scss +6 -0
  50. data/assets/stylesheets/bootstrap/_helpers.scss +2 -0
  51. data/assets/stylesheets/bootstrap/_list-group.scss +12 -7
  52. data/assets/stylesheets/bootstrap/_maps.scss +120 -0
  53. data/assets/stylesheets/bootstrap/_mixins.scss +1 -2
  54. data/assets/stylesheets/bootstrap/_modal.scss +0 -1
  55. data/assets/stylesheets/bootstrap/_nav.scss +42 -17
  56. data/assets/stylesheets/bootstrap/_navbar.scss +15 -4
  57. data/assets/stylesheets/bootstrap/_offcanvas.scss +5 -6
  58. data/assets/stylesheets/bootstrap/_pagination.scss +1 -1
  59. data/assets/stylesheets/bootstrap/_progress.scss +10 -1
  60. data/assets/stylesheets/bootstrap/_reboot.scss +8 -7
  61. data/assets/stylesheets/bootstrap/_root.scss +124 -10
  62. data/assets/stylesheets/bootstrap/_tables.scss +19 -12
  63. data/assets/stylesheets/bootstrap/_tooltip.scss +4 -5
  64. data/assets/stylesheets/bootstrap/_utilities.scss +175 -16
  65. data/assets/stylesheets/bootstrap/_variables-dark.scss +87 -0
  66. data/assets/stylesheets/bootstrap/_variables.scss +289 -172
  67. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +23 -3
  68. data/assets/stylesheets/bootstrap/forms/_form-check.scss +27 -13
  69. data/assets/stylesheets/bootstrap/forms/_form-control.scss +24 -4
  70. data/assets/stylesheets/bootstrap/forms/_form-range.scss +3 -3
  71. data/assets/stylesheets/bootstrap/forms/_form-select.scss +12 -3
  72. data/assets/stylesheets/bootstrap/forms/_input-group.scss +1 -1
  73. data/assets/stylesheets/bootstrap/helpers/_color-bg.scss +1 -4
  74. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +20 -2
  75. data/assets/stylesheets/bootstrap/helpers/_focus-ring.scss +5 -0
  76. data/assets/stylesheets/bootstrap/helpers/_icon-link.scss +25 -0
  77. data/assets/stylesheets/bootstrap/helpers/_vr.scss +1 -1
  78. data/assets/stylesheets/bootstrap/mixins/_alert.scss +4 -1
  79. data/assets/stylesheets/bootstrap/mixins/_banner.scss +2 -4
  80. data/assets/stylesheets/bootstrap/mixins/_caret.scss +30 -25
  81. data/assets/stylesheets/bootstrap/mixins/_color-mode.scss +21 -0
  82. data/assets/stylesheets/bootstrap/mixins/_forms.scss +20 -9
  83. data/assets/stylesheets/bootstrap/mixins/_grid.scss +2 -2
  84. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -0
  85. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +1 -1
  86. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +5 -1
  87. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +23 -29
  88. data/bootstrap.gemspec +4 -3
  89. data/lib/bootstrap/engine.rb +17 -1
  90. data/lib/bootstrap/version.rb +2 -2
  91. data/tasks/updater/js.rb +1 -1
  92. data/tasks/updater/network.rb +2 -2
  93. data/tasks/updater/scss.rb +2 -2
  94. data/test/gemfiles/rails_4_2.gemfile +2 -1
  95. data/test/gemfiles/rails_5_0.gemfile +1 -1
  96. data/test/gemfiles/rails_5_1.gemfile +1 -1
  97. data/test/gemfiles/rails_5_2.gemfile +8 -0
  98. data/test/gemfiles/rails_6_0.gemfile +1 -0
  99. data/test/gemfiles/rails_6_1.gemfile +1 -0
  100. data/test/gemfiles/rails_7_0_dartsass.gemfile +8 -0
  101. data/test/gemfiles/rails_7_0_sassc.gemfile +8 -0
  102. data/test/test_helper.rb +3 -2
  103. metadata +42 -18
  104. data/.travis.yml +0 -32
  105. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +0 -15
@@ -5,6 +5,7 @@
5
5
  > .form-control-plaintext,
6
6
  > .form-select {
7
7
  height: $form-floating-height;
8
+ min-height: $form-floating-height;
8
9
  line-height: $form-floating-line-height;
9
10
  }
10
11
 
@@ -12,7 +13,7 @@
12
13
  position: absolute;
13
14
  top: 0;
14
15
  left: 0;
15
- width: 100%;
16
+ z-index: 2;
16
17
  height: 100%; // allow textareas
17
18
  padding: $form-floating-padding-y $form-floating-padding-x;
18
19
  overflow: hidden;
@@ -55,14 +56,24 @@
55
56
  > .form-control-plaintext,
56
57
  > .form-select {
57
58
  ~ label {
58
- opacity: $form-floating-label-opacity;
59
+ color: rgba(var(--#{$prefix}body-color-rgb), #{$form-floating-label-opacity});
59
60
  transform: $form-floating-label-transform;
61
+
62
+ &::after {
63
+ position: absolute;
64
+ inset: $form-floating-padding-y ($form-floating-padding-x * .5);
65
+ z-index: -1;
66
+ height: $form-floating-label-height;
67
+ content: "";
68
+ background-color: $input-bg;
69
+ @include border-radius($input-border-radius);
70
+ }
60
71
  }
61
72
  }
62
73
  // Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
63
74
  > .form-control:-webkit-autofill {
64
75
  ~ label {
65
- opacity: $form-floating-label-opacity;
76
+ color: rgba(var(--#{$prefix}body-color-rgb), #{$form-floating-label-opacity});
66
77
  transform: $form-floating-label-transform;
67
78
  }
68
79
  }
@@ -72,4 +83,13 @@
72
83
  border-width: $input-border-width 0; // Required to properly position label text - as explained above
73
84
  }
74
85
  }
86
+
87
+ > :disabled ~ label,
88
+ > .form-control:disabled ~ label { // Required for `.form-control`s because of specificity
89
+ color: $form-floating-label-disabled-color;
90
+
91
+ &::after {
92
+ background-color: $input-disabled-bg;
93
+ }
94
+ }
75
95
  }
@@ -27,16 +27,20 @@
27
27
  }
28
28
 
29
29
  .form-check-input {
30
+ --#{$prefix}form-check-bg: #{$form-check-input-bg};
31
+
32
+ flex-shrink: 0;
30
33
  width: $form-check-input-width;
31
34
  height: $form-check-input-width;
32
35
  margin-top: ($line-height-base - $form-check-input-width) * .5; // line-height minus check height
33
36
  vertical-align: top;
34
- background-color: $form-check-input-bg;
37
+ appearance: none;
38
+ background-color: var(--#{$prefix}form-check-bg);
39
+ background-image: var(--#{$prefix}form-check-bg-image);
35
40
  background-repeat: no-repeat;
36
41
  background-position: center;
37
42
  background-size: contain;
38
43
  border: $form-check-input-border;
39
- appearance: none;
40
44
  print-color-adjust: exact; // Keep themed appearance for print
41
45
  @include transition($form-check-transition);
42
46
 
@@ -65,17 +69,17 @@
65
69
 
66
70
  &[type="checkbox"] {
67
71
  @if $enable-gradients {
68
- background-image: escape-svg($form-check-input-checked-bg-image), var(--#{$prefix}gradient);
72
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-checked-bg-image)}, var(--#{$prefix}gradient);
69
73
  } @else {
70
- background-image: escape-svg($form-check-input-checked-bg-image);
74
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-checked-bg-image)};
71
75
  }
72
76
  }
73
77
 
74
78
  &[type="radio"] {
75
79
  @if $enable-gradients {
76
- background-image: escape-svg($form-check-radio-checked-bg-image), var(--#{$prefix}gradient);
80
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-radio-checked-bg-image)}, var(--#{$prefix}gradient);
77
81
  } @else {
78
- background-image: escape-svg($form-check-radio-checked-bg-image);
82
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-radio-checked-bg-image)};
79
83
  }
80
84
  }
81
85
  }
@@ -85,9 +89,9 @@
85
89
  border-color: $form-check-input-indeterminate-border-color;
86
90
 
87
91
  @if $enable-gradients {
88
- background-image: escape-svg($form-check-input-indeterminate-bg-image), var(--#{$prefix}gradient);
92
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-indeterminate-bg-image)}, var(--#{$prefix}gradient);
89
93
  } @else {
90
- background-image: escape-svg($form-check-input-indeterminate-bg-image);
94
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-indeterminate-bg-image)};
91
95
  }
92
96
  }
93
97
 
@@ -121,24 +125,26 @@
121
125
  padding-left: $form-switch-padding-start;
122
126
 
123
127
  .form-check-input {
128
+ --#{$prefix}form-switch-bg: #{escape-svg($form-switch-bg-image)};
129
+
124
130
  width: $form-switch-width;
125
131
  margin-left: $form-switch-padding-start * -1;
126
- background-image: escape-svg($form-switch-bg-image);
132
+ background-image: var(--#{$prefix}form-switch-bg);
127
133
  background-position: left center;
128
- @include border-radius($form-switch-border-radius);
134
+ @include border-radius($form-switch-border-radius, 0);
129
135
  @include transition($form-switch-transition);
130
136
 
131
137
  &:focus {
132
- background-image: escape-svg($form-switch-focus-bg-image);
138
+ --#{$prefix}form-switch-bg: #{escape-svg($form-switch-focus-bg-image)};
133
139
  }
134
140
 
135
141
  &:checked {
136
142
  background-position: $form-switch-checked-bg-position;
137
143
 
138
144
  @if $enable-gradients {
139
- background-image: escape-svg($form-switch-checked-bg-image), var(--#{$prefix}gradient);
145
+ --#{$prefix}form-switch-bg: #{escape-svg($form-switch-checked-bg-image)}, var(--#{$prefix}gradient);
140
146
  } @else {
141
- background-image: escape-svg($form-switch-checked-bg-image);
147
+ --#{$prefix}form-switch-bg: #{escape-svg($form-switch-checked-bg-image)};
142
148
  }
143
149
  }
144
150
  }
@@ -173,3 +179,11 @@
173
179
  }
174
180
  }
175
181
  }
182
+
183
+ @if $enable-dark-mode {
184
+ @include color-mode(dark) {
185
+ .form-switch .form-check-input:not(:checked):not(:focus) {
186
+ --#{$prefix}form-switch-bg: #{escape-svg($form-switch-bg-image-dark)};
187
+ }
188
+ }
189
+ }
@@ -11,10 +11,10 @@
11
11
  font-weight: $input-font-weight;
12
12
  line-height: $input-line-height;
13
13
  color: $input-color;
14
+ appearance: none; // Fix appearance for date inputs in Safari
14
15
  background-color: $input-bg;
15
16
  background-clip: padding-box;
16
17
  border: $input-border-width solid $input-border-color;
17
- appearance: none; // Fix appearance for date inputs in Safari
18
18
 
19
19
  // Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
20
20
  @include border-radius($input-border-radius, 0);
@@ -44,12 +44,31 @@
44
44
  }
45
45
  }
46
46
 
47
- // Add some height to date inputs on iOS
48
- // https://github.com/twbs/bootstrap/issues/23307
49
- // TODO: we can remove this workaround once https://bugs.webkit.org/show_bug.cgi?id=198959 is resolved
50
47
  &::-webkit-date-and-time-value {
48
+ // On Android Chrome, form-control's "width: 100%" makes the input width too small
49
+ // Tested under Android 11 / Chrome 89, Android 12 / Chrome 100, Android 13 / Chrome 109
50
+ //
51
+ // On iOS Safari, form-control's "appearance: none" + "width: 100%" makes the input width too small
52
+ // Tested under iOS 16.2 / Safari 16.2
53
+ min-width: 85px; // Seems to be a good minimum safe width
54
+
55
+ // Add some height to date inputs on iOS
56
+ // https://github.com/twbs/bootstrap/issues/23307
57
+ // TODO: we can remove this workaround once https://bugs.webkit.org/show_bug.cgi?id=198959 is resolved
51
58
  // Multiply line-height by 1em if it has no unit
52
59
  height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height);
60
+
61
+ // Android Chrome type="date" is taller than the other inputs
62
+ // because of "margin: 1px 24px 1px 4px" inside the shadow DOM
63
+ // Tested under Android 11 / Chrome 89, Android 12 / Chrome 100, Android 13 / Chrome 109
64
+ margin: 0;
65
+ }
66
+
67
+ // Prevent excessive date input height in Webkit
68
+ // https://github.com/twbs/bootstrap/issues/34433
69
+ &::-webkit-datetime-edit {
70
+ display: block;
71
+ padding: 0;
53
72
  }
54
73
 
55
74
  // Placeholder
@@ -186,6 +205,7 @@ textarea {
186
205
  }
187
206
 
188
207
  &::-webkit-color-swatch {
208
+ border: 0 !important; // stylelint-disable-line declaration-no-important
189
209
  @include border-radius($input-border-radius);
190
210
  }
191
211
 
@@ -8,8 +8,8 @@
8
8
  width: 100%;
9
9
  height: add($form-range-thumb-height, $form-range-thumb-focus-box-shadow-width * 2);
10
10
  padding: 0; // Need to reset padding
11
- background-color: transparent;
12
11
  appearance: none;
12
+ background-color: transparent;
13
13
 
14
14
  &:focus {
15
15
  outline: 0;
@@ -28,12 +28,12 @@
28
28
  width: $form-range-thumb-width;
29
29
  height: $form-range-thumb-height;
30
30
  margin-top: ($form-range-track-height - $form-range-thumb-height) * .5; // Webkit specific
31
+ appearance: none;
31
32
  @include gradient-bg($form-range-thumb-bg);
32
33
  border: $form-range-thumb-border;
33
34
  @include border-radius($form-range-thumb-border-radius);
34
35
  @include box-shadow($form-range-thumb-box-shadow);
35
36
  @include transition($form-range-thumb-transition);
36
- appearance: none;
37
37
 
38
38
  &:active {
39
39
  @include gradient-bg($form-range-thumb-active-bg);
@@ -54,12 +54,12 @@
54
54
  &::-moz-range-thumb {
55
55
  width: $form-range-thumb-width;
56
56
  height: $form-range-thumb-height;
57
+ appearance: none;
57
58
  @include gradient-bg($form-range-thumb-bg);
58
59
  border: $form-range-thumb-border;
59
60
  @include border-radius($form-range-thumb-border-radius);
60
61
  @include box-shadow($form-range-thumb-box-shadow);
61
62
  @include transition($form-range-thumb-transition);
62
- appearance: none;
63
63
 
64
64
  &:active {
65
65
  @include gradient-bg($form-range-thumb-active-bg);
@@ -4,17 +4,19 @@
4
4
  // https://primer.github.io/.
5
5
 
6
6
  .form-select {
7
+ --#{$prefix}form-select-bg-img: #{escape-svg($form-select-indicator)};
8
+
7
9
  display: block;
8
10
  width: 100%;
9
11
  padding: $form-select-padding-y $form-select-indicator-padding $form-select-padding-y $form-select-padding-x;
10
- -moz-padding-start: subtract($form-select-padding-x, 3px); // See https://github.com/twbs/bootstrap/issues/32636
11
12
  font-family: $form-select-font-family;
12
13
  @include font-size($form-select-font-size);
13
14
  font-weight: $form-select-font-weight;
14
15
  line-height: $form-select-line-height;
15
16
  color: $form-select-color;
17
+ appearance: none;
16
18
  background-color: $form-select-bg;
17
- background-image: escape-svg($form-select-indicator);
19
+ background-image: var(--#{$prefix}form-select-bg-img), var(--#{$prefix}form-select-bg-icon, none);
18
20
  background-repeat: no-repeat;
19
21
  background-position: $form-select-bg-position;
20
22
  background-size: $form-select-bg-size;
@@ -22,7 +24,6 @@
22
24
  @include border-radius($form-select-border-radius, 0);
23
25
  @include box-shadow($form-select-box-shadow);
24
26
  @include transition($form-select-transition);
25
- appearance: none;
26
27
 
27
28
  &:focus {
28
29
  border-color: $form-select-focus-border-color;
@@ -69,3 +70,11 @@
69
70
  @include font-size($form-select-font-size-lg);
70
71
  @include border-radius($form-select-border-radius-lg);
71
72
  }
73
+
74
+ @if $enable-dark-mode {
75
+ @include color-mode(dark) {
76
+ .form-select {
77
+ --#{$prefix}form-select-bg-img: #{escape-svg($form-select-indicator-dark)};
78
+ }
79
+ }
80
+ }
@@ -121,7 +121,7 @@
121
121
  }
122
122
 
123
123
  > :not(:first-child):not(.dropdown-menu)#{$validation-messages} {
124
- margin-left: -$input-border-width;
124
+ margin-left: calc(#{$input-border-width} * -1); // stylelint-disable-line function-disallowed-list
125
125
  @include border-start-radius(0);
126
126
  }
127
127
 
@@ -1,10 +1,7 @@
1
- // stylelint-disable function-name-case
2
-
3
1
  // All-caps `RGBA()` function used because of this Sass bug: https://github.com/sass/node-sass/issues/2251
4
2
  @each $color, $value in $theme-colors {
5
- $color-rgb: to-rgb($value);
6
3
  .text-bg-#{$color} {
7
4
  color: color-contrast($value) if($enable-important-utilities, !important, null);
8
- background-color: RGBA($color-rgb, var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
5
+ background-color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
9
6
  }
10
7
  }
@@ -1,12 +1,30 @@
1
+ // All-caps `RGBA()` function used because of this Sass bug: https://github.com/sass/node-sass/issues/2251
1
2
  @each $color, $value in $theme-colors {
2
3
  .link-#{$color} {
3
- color: $value !important; // stylelint-disable-line declaration-no-important
4
+ color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
5
+ text-decoration-color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
4
6
 
5
7
  @if $link-shade-percentage != 0 {
6
8
  &:hover,
7
9
  &:focus {
8
- color: if(color-contrast($value) == $color-contrast-light, shade-color($value, $link-shade-percentage), tint-color($value, $link-shade-percentage)) !important; // stylelint-disable-line declaration-no-important
10
+ $hover-color: if(color-contrast($value) == $color-contrast-light, shade-color($value, $link-shade-percentage), tint-color($value, $link-shade-percentage));
11
+ color: RGBA(#{to-rgb($hover-color)}, var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
12
+ text-decoration-color: RGBA(to-rgb($hover-color), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
9
13
  }
10
14
  }
11
15
  }
12
16
  }
17
+
18
+ // One-off special link helper as a bridge until v6
19
+ .link-body-emphasis {
20
+ color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
21
+ text-decoration-color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
22
+
23
+ @if $link-shade-percentage != 0 {
24
+ &:hover,
25
+ &:focus {
26
+ color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-opacity, .75)) if($enable-important-utilities, !important, null);
27
+ text-decoration-color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-underline-opacity, .75)) if($enable-important-utilities, !important, null);
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,5 @@
1
+ .focus-ring:focus {
2
+ outline: 0;
3
+ // By default, there is no `--bs-focus-ring-x`, `--bs-focus-ring-y`, or `--bs-focus-ring-blur`, but we provide CSS variables with fallbacks to initial `0` values
4
+ box-shadow: var(--#{$prefix}focus-ring-x, 0) var(--#{$prefix}focus-ring-y, 0) var(--#{$prefix}focus-ring-blur, 0) var(--#{$prefix}focus-ring-width) var(--#{$prefix}focus-ring-color);
5
+ }
@@ -0,0 +1,25 @@
1
+ .icon-link {
2
+ display: inline-flex;
3
+ gap: $icon-link-gap;
4
+ align-items: center;
5
+ text-decoration-color: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-opacity, .5));
6
+ text-underline-offset: $icon-link-underline-offset;
7
+ backface-visibility: hidden;
8
+
9
+ > .bi {
10
+ flex-shrink: 0;
11
+ width: $icon-link-icon-size;
12
+ height: $icon-link-icon-size;
13
+ fill: currentcolor;
14
+ @include transition($icon-link-icon-transition);
15
+ }
16
+ }
17
+
18
+ .icon-link-hover {
19
+ &:hover,
20
+ &:focus-visible {
21
+ > .bi {
22
+ transform: var(--#{$prefix}icon-link-transform, $icon-link-icon-transform);
23
+ }
24
+ }
25
+ }
@@ -1,7 +1,7 @@
1
1
  .vr {
2
2
  display: inline-block;
3
3
  align-self: stretch;
4
- width: 1px;
4
+ width: $vr-border-width;
5
5
  min-height: 1em;
6
6
  background-color: currentcolor;
7
7
  opacity: $hr-opacity;
@@ -1,15 +1,18 @@
1
+ @include deprecate("`alert-variant()`", "v5.3.0", "v6.0.0");
2
+
1
3
  // scss-docs-start alert-variant-mixin
2
4
  @mixin alert-variant($background, $border, $color) {
3
5
  --#{$prefix}alert-color: #{$color};
4
6
  --#{$prefix}alert-bg: #{$background};
5
7
  --#{$prefix}alert-border-color: #{$border};
8
+ --#{$prefix}alert-link-color: #{shade-color($color, 20%)};
6
9
 
7
10
  @if $enable-gradients {
8
11
  background-image: var(--#{$prefix}gradient);
9
12
  }
10
13
 
11
14
  .alert-link {
12
- color: shade-color($color, 20%);
15
+ color: var(--#{$prefix}alert-link-color);
13
16
  }
14
17
  }
15
18
  // scss-docs-end alert-variant-mixin
@@ -1,9 +1,7 @@
1
1
  @mixin bsBanner($file) {
2
2
  /*!
3
- * Bootstrap #{$file} v5.2.2 (https://getbootstrap.com/)
4
- * Copyright 2011-2022 The Bootstrap Authors
5
- * Copyright 2011-2022 Twitter, Inc.
3
+ * Bootstrap #{$file} v5.3.3 (https://getbootstrap.com/)
4
+ * Copyright 2011-2024 The Bootstrap Authors
6
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
7
6
  */
8
7
  }
9
-
@@ -1,44 +1,49 @@
1
1
  // scss-docs-start caret-mixins
2
- @mixin caret-down {
3
- border-top: $caret-width solid;
4
- border-right: $caret-width solid transparent;
2
+ @mixin caret-down($width: $caret-width) {
3
+ border-top: $width solid;
4
+ border-right: $width solid transparent;
5
5
  border-bottom: 0;
6
- border-left: $caret-width solid transparent;
6
+ border-left: $width solid transparent;
7
7
  }
8
8
 
9
- @mixin caret-up {
9
+ @mixin caret-up($width: $caret-width) {
10
10
  border-top: 0;
11
- border-right: $caret-width solid transparent;
12
- border-bottom: $caret-width solid;
13
- border-left: $caret-width solid transparent;
11
+ border-right: $width solid transparent;
12
+ border-bottom: $width solid;
13
+ border-left: $width solid transparent;
14
14
  }
15
15
 
16
- @mixin caret-end {
17
- border-top: $caret-width solid transparent;
16
+ @mixin caret-end($width: $caret-width) {
17
+ border-top: $width solid transparent;
18
18
  border-right: 0;
19
- border-bottom: $caret-width solid transparent;
20
- border-left: $caret-width solid;
19
+ border-bottom: $width solid transparent;
20
+ border-left: $width solid;
21
21
  }
22
22
 
23
- @mixin caret-start {
24
- border-top: $caret-width solid transparent;
25
- border-right: $caret-width solid;
26
- border-bottom: $caret-width solid transparent;
23
+ @mixin caret-start($width: $caret-width) {
24
+ border-top: $width solid transparent;
25
+ border-right: $width solid;
26
+ border-bottom: $width solid transparent;
27
27
  }
28
28
 
29
- @mixin caret($direction: down) {
29
+ @mixin caret(
30
+ $direction: down,
31
+ $width: $caret-width,
32
+ $spacing: $caret-spacing,
33
+ $vertical-align: $caret-vertical-align
34
+ ) {
30
35
  @if $enable-caret {
31
36
  &::after {
32
37
  display: inline-block;
33
- margin-left: $caret-spacing;
34
- vertical-align: $caret-vertical-align;
38
+ margin-left: $spacing;
39
+ vertical-align: $vertical-align;
35
40
  content: "";
36
41
  @if $direction == down {
37
- @include caret-down();
42
+ @include caret-down($width);
38
43
  } @else if $direction == up {
39
- @include caret-up();
44
+ @include caret-up($width);
40
45
  } @else if $direction == end {
41
- @include caret-end();
46
+ @include caret-end($width);
42
47
  }
43
48
  }
44
49
 
@@ -49,10 +54,10 @@
49
54
 
50
55
  &::before {
51
56
  display: inline-block;
52
- margin-right: $caret-spacing;
53
- vertical-align: $caret-vertical-align;
57
+ margin-right: $spacing;
58
+ vertical-align: $vertical-align;
54
59
  content: "";
55
- @include caret-start();
60
+ @include caret-start($width);
56
61
  }
57
62
  }
58
63
 
@@ -0,0 +1,21 @@
1
+ // scss-docs-start color-mode-mixin
2
+ @mixin color-mode($mode: light, $root: false) {
3
+ @if $color-mode-type == "media-query" {
4
+ @if $root == true {
5
+ @media (prefers-color-scheme: $mode) {
6
+ :root {
7
+ @content;
8
+ }
9
+ }
10
+ } @else {
11
+ @media (prefers-color-scheme: $mode) {
12
+ @content;
13
+ }
14
+ }
15
+ } @else {
16
+ [data-bs-theme="#{$mode}"] {
17
+ @content;
18
+ }
19
+ }
20
+ }
21
+ // scss-docs-end color-mode-mixin
@@ -21,7 +21,8 @@
21
21
  $icon,
22
22
  $tooltip-color: color-contrast($color),
23
23
  $tooltip-bg-color: rgba($color, $form-feedback-tooltip-opacity),
24
- $focus-box-shadow: 0 0 $input-btn-focus-blur $input-focus-width rgba($color, $input-btn-focus-color-opacity)
24
+ $focus-box-shadow: 0 0 $input-btn-focus-blur $input-focus-width rgba($color, $input-btn-focus-color-opacity),
25
+ $border-color: $color
25
26
  ) {
26
27
  .#{$state}-feedback {
27
28
  display: none;
@@ -56,7 +57,7 @@
56
57
 
57
58
  .form-control {
58
59
  @include form-validation-state-selector($state) {
59
- border-color: $color;
60
+ border-color: $border-color;
60
61
 
61
62
  @if $enable-validation-icons {
62
63
  padding-right: $input-height-inner;
@@ -67,8 +68,13 @@
67
68
  }
68
69
 
69
70
  &:focus {
70
- border-color: $color;
71
- box-shadow: $focus-box-shadow;
71
+ border-color: $border-color;
72
+ @if $enable-shadows {
73
+ @include box-shadow($input-box-shadow, $focus-box-shadow);
74
+ } @else {
75
+ // Avoid using mixin so we can pass custom focus shadow properly
76
+ box-shadow: $focus-box-shadow;
77
+ }
72
78
  }
73
79
  }
74
80
  }
@@ -85,21 +91,26 @@
85
91
 
86
92
  .form-select {
87
93
  @include form-validation-state-selector($state) {
88
- border-color: $color;
94
+ border-color: $border-color;
89
95
 
90
96
  @if $enable-validation-icons {
91
97
  &:not([multiple]):not([size]),
92
98
  &:not([multiple])[size="1"] {
99
+ --#{$prefix}form-select-bg-icon: #{escape-svg($icon)};
93
100
  padding-right: $form-select-feedback-icon-padding-end;
94
- background-image: escape-svg($form-select-indicator), escape-svg($icon);
95
101
  background-position: $form-select-bg-position, $form-select-feedback-icon-position;
96
102
  background-size: $form-select-bg-size, $form-select-feedback-icon-size;
97
103
  }
98
104
  }
99
105
 
100
106
  &:focus {
101
- border-color: $color;
102
- box-shadow: $focus-box-shadow;
107
+ border-color: $border-color;
108
+ @if $enable-shadows {
109
+ @include box-shadow($form-select-box-shadow, $focus-box-shadow);
110
+ } @else {
111
+ // Avoid using mixin so we can pass custom focus shadow properly
112
+ box-shadow: $focus-box-shadow;
113
+ }
103
114
  }
104
115
  }
105
116
  }
@@ -114,7 +125,7 @@
114
125
 
115
126
  .form-check-input {
116
127
  @include form-validation-state-selector($state) {
117
- border-color: $color;
128
+ border-color: $border-color;
118
129
 
119
130
  &:checked {
120
131
  background-color: $color;
@@ -56,7 +56,7 @@
56
56
  @mixin row-cols($count) {
57
57
  > * {
58
58
  flex: 0 0 auto;
59
- width: divide(100%, $count);
59
+ width: percentage(divide(1, $count));
60
60
  }
61
61
  }
62
62
 
@@ -138,7 +138,7 @@
138
138
  }
139
139
  }
140
140
 
141
- // Start with `1` because `0` is and invalid value.
141
+ // Start with `1` because `0` is an invalid value.
142
142
  // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.
143
143
  @for $i from 1 through ($columns - 1) {
144
144
  .g-start#{$infix}-#{$i} {
@@ -1,3 +1,5 @@
1
+ @include deprecate("`list-group-item-variant()`", "v5.3.0", "v6.0.0");
2
+
1
3
  // List Groups
2
4
 
3
5
  // scss-docs-start list-group-mixin
@@ -1,6 +1,6 @@
1
1
  // Utility generator
2
2
  // Used to generate utilities & print utilities
3
- @mixin generate-utility($utility, $infix, $is-rfs-media-query: false) {
3
+ @mixin generate-utility($utility, $infix: "", $is-rfs-media-query: false) {
4
4
  $values: map-get($utility, values);
5
5
 
6
6
  // If the values are a list or string, convert it into a map
@@ -6,7 +6,6 @@
6
6
  // See: https://kittygiraudel.com/2016/10/13/css-hide-and-seek/
7
7
 
8
8
  @mixin visually-hidden() {
9
- position: absolute !important;
10
9
  width: 1px !important;
11
10
  height: 1px !important;
12
11
  padding: 0 !important;
@@ -15,6 +14,11 @@
15
14
  clip: rect(0, 0, 0, 0) !important;
16
15
  white-space: nowrap !important;
17
16
  border: 0 !important;
17
+
18
+ // Fix for positioned table caption that could become anonymous cells
19
+ &:not(caption) {
20
+ position: absolute !important;
21
+ }
18
22
  }
19
23
 
20
24
  // Use to only display content when it's focused, or one of its child elements is focused