bootstrap 5.2.3 → 5.3.0.alpha3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap/alert.js +21 -32
  4. data/assets/javascripts/bootstrap/base-component.js +21 -38
  5. data/assets/javascripts/bootstrap/button.js +18 -22
  6. data/assets/javascripts/bootstrap/carousel.js +51 -135
  7. data/assets/javascripts/bootstrap/collapse.js +39 -102
  8. data/assets/javascripts/bootstrap/dom/data.js +8 -12
  9. data/assets/javascripts/bootstrap/dom/event-handler.js +18 -66
  10. data/assets/javascripts/bootstrap/dom/manipulator.js +4 -17
  11. data/assets/javascripts/bootstrap/dom/selector-engine.js +41 -24
  12. data/assets/javascripts/bootstrap/dropdown.js +73 -145
  13. data/assets/javascripts/bootstrap/modal.js +52 -133
  14. data/assets/javascripts/bootstrap/offcanvas.js +49 -102
  15. data/assets/javascripts/bootstrap/popover.js +22 -29
  16. data/assets/javascripts/bootstrap/scrollspy.js +51 -89
  17. data/assets/javascripts/bootstrap/tab.js +51 -109
  18. data/assets/javascripts/bootstrap/toast.js +30 -73
  19. data/assets/javascripts/bootstrap/tooltip.js +74 -177
  20. data/assets/javascripts/bootstrap/util/backdrop.js +27 -54
  21. data/assets/javascripts/bootstrap/util/component-functions.js +13 -19
  22. data/assets/javascripts/bootstrap/util/config.js +14 -27
  23. data/assets/javascripts/bootstrap/util/focustrap.js +19 -36
  24. data/assets/javascripts/bootstrap/util/index.js +42 -111
  25. data/assets/javascripts/bootstrap/util/sanitizer.js +13 -19
  26. data/assets/javascripts/bootstrap/util/scrollbar.js +23 -50
  27. data/assets/javascripts/bootstrap/util/swipe.js +26 -48
  28. data/assets/javascripts/bootstrap/util/template-factory.js +24 -52
  29. data/assets/javascripts/bootstrap-sprockets.js +1 -1
  30. data/assets/javascripts/bootstrap.js +626 -1406
  31. data/assets/javascripts/bootstrap.min.js +3 -3
  32. data/assets/stylesheets/_bootstrap-grid.scss +1 -3
  33. data/assets/stylesheets/_bootstrap-reboot.scss +1 -0
  34. data/assets/stylesheets/_bootstrap.scss +1 -0
  35. data/assets/stylesheets/bootstrap/_accordion.scss +9 -0
  36. data/assets/stylesheets/bootstrap/_alert.scss +8 -11
  37. data/assets/stylesheets/bootstrap/_button-group.scss +2 -2
  38. data/assets/stylesheets/bootstrap/_buttons.scss +3 -3
  39. data/assets/stylesheets/bootstrap/_card.scss +5 -0
  40. data/assets/stylesheets/bootstrap/_carousel.scss +20 -2
  41. data/assets/stylesheets/bootstrap/_close.scss +32 -9
  42. data/assets/stylesheets/bootstrap/_dropdown.scss +1 -0
  43. data/assets/stylesheets/bootstrap/_functions.scss +1 -1
  44. data/assets/stylesheets/bootstrap/_grid.scss +6 -0
  45. data/assets/stylesheets/bootstrap/_helpers.scss +2 -0
  46. data/assets/stylesheets/bootstrap/_list-group.scss +12 -7
  47. data/assets/stylesheets/bootstrap/_maps.scss +120 -0
  48. data/assets/stylesheets/bootstrap/_mixins.scss +1 -2
  49. data/assets/stylesheets/bootstrap/_nav.scss +40 -3
  50. data/assets/stylesheets/bootstrap/_navbar.scss +13 -3
  51. data/assets/stylesheets/bootstrap/_offcanvas.scss +4 -2
  52. data/assets/stylesheets/bootstrap/_pagination.scss +1 -1
  53. data/assets/stylesheets/bootstrap/_progress.scss +10 -1
  54. data/assets/stylesheets/bootstrap/_reboot.scss +3 -3
  55. data/assets/stylesheets/bootstrap/_root.scss +125 -10
  56. data/assets/stylesheets/bootstrap/_tables.scss +1 -1
  57. data/assets/stylesheets/bootstrap/_tooltip.scss +4 -5
  58. data/assets/stylesheets/bootstrap/_utilities.scss +172 -13
  59. data/assets/stylesheets/bootstrap/_variables-dark.scss +85 -0
  60. data/assets/stylesheets/bootstrap/_variables.scss +260 -151
  61. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -0
  62. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +21 -3
  63. data/assets/stylesheets/bootstrap/forms/_form-check.scss +24 -11
  64. data/assets/stylesheets/bootstrap/forms/_form-control.scss +23 -3
  65. data/assets/stylesheets/bootstrap/forms/_form-select.scss +11 -2
  66. data/assets/stylesheets/bootstrap/forms/_input-group.scss +1 -1
  67. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +22 -2
  68. data/assets/stylesheets/bootstrap/helpers/_focus-ring.scss +5 -0
  69. data/assets/stylesheets/bootstrap/helpers/_icon-link.scss +25 -0
  70. data/assets/stylesheets/bootstrap/mixins/_alert.scss +4 -1
  71. data/assets/stylesheets/bootstrap/mixins/_banner.scss +2 -4
  72. data/assets/stylesheets/bootstrap/mixins/_caret.scss +30 -25
  73. data/assets/stylesheets/bootstrap/mixins/_color-mode.scss +21 -0
  74. data/assets/stylesheets/bootstrap/mixins/_forms.scss +8 -7
  75. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -0
  76. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +1 -1
  77. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +5 -1
  78. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +23 -29
  79. data/bootstrap.gemspec +1 -1
  80. data/lib/bootstrap/version.rb +2 -2
  81. data/tasks/updater/js.rb +1 -1
  82. data/tasks/updater/scss.rb +1 -1
  83. metadata +10 -6
@@ -2,6 +2,12 @@
2
2
  //
3
3
  // Rows contain your columns.
4
4
 
5
+ :root {
6
+ @each $name, $value in $grid-breakpoints {
7
+ --#{$prefix}breakpoint-#{$name}: #{$value};
8
+ }
9
+ }
10
+
5
11
  @if $enable-grid-classes {
6
12
  .row {
7
13
  @include make-row();
@@ -1,6 +1,8 @@
1
1
  @import "helpers/clearfix";
2
2
  @import "helpers/color-bg";
3
3
  @import "helpers/colored-links";
4
+ @import "helpers/focus-ring";
5
+ @import "helpers/icon-link";
4
6
  @import "helpers/ratio";
5
7
  @import "helpers/position";
6
8
  @import "helpers/stacks";
@@ -180,13 +180,18 @@
180
180
  // Add modifier classes to change text and background color on individual items.
181
181
  // Organizationally, this must come after the `:hover` states.
182
182
 
183
- @each $state, $value in $theme-colors {
184
- $list-group-variant-bg: shift-color($value, $list-group-item-bg-scale);
185
- $list-group-variant-color: shift-color($value, $list-group-item-color-scale);
186
- @if (contrast-ratio($list-group-variant-bg, $list-group-variant-color) < $min-contrast-ratio) {
187
- $list-group-variant-color: mix($value, color-contrast($list-group-variant-bg), abs($list-group-item-color-scale));
183
+ @each $state in map-keys($theme-colors) {
184
+ .list-group-item-#{$state} {
185
+ --#{$prefix}list-group-color: var(--#{$prefix}#{$state}-text-emphasis);
186
+ --#{$prefix}list-group-bg: var(--#{$prefix}#{$state}-bg-subtle);
187
+ --#{$prefix}list-group-border-color: var(--#{$prefix}#{$state}-border-subtle);
188
+ --#{$prefix}list-group-action-hover-color: var(--#{$prefix}emphasis-color);
189
+ --#{$prefix}list-group-action-hover-bg: var(--#{$prefix}#{$state}-border-subtle);
190
+ --#{$prefix}list-group-action-active-color: var(--#{$prefix}emphasis-color);
191
+ --#{$prefix}list-group-action-active-bg: var(--#{$prefix}#{$state}-border-subtle);
192
+ --#{$prefix}list-group-active-color: var(--#{$prefix}#{$state}-bg-subtle);
193
+ --#{$prefix}list-group-active-bg: var(--#{$prefix}#{$state}-text-emphasis);
194
+ --#{$prefix}list-group-active-border-color: var(--#{$prefix}#{$state}-text-emphasis);
188
195
  }
189
-
190
- @include list-group-item-variant($state, $list-group-variant-bg, $list-group-variant-color);
191
196
  }
192
197
  // scss-docs-end list-group-modifiers
@@ -6,6 +6,90 @@
6
6
  $theme-colors-rgb: map-loop($theme-colors, to-rgb, "$value") !default;
7
7
  // scss-docs-end theme-colors-rgb
8
8
 
9
+ // scss-docs-start theme-text-map
10
+ $theme-colors-text: (
11
+ "primary": $primary-text-emphasis,
12
+ "secondary": $secondary-text-emphasis,
13
+ "success": $success-text-emphasis,
14
+ "info": $info-text-emphasis,
15
+ "warning": $warning-text-emphasis,
16
+ "danger": $danger-text-emphasis,
17
+ "light": $light-text-emphasis,
18
+ "dark": $dark-text-emphasis,
19
+ ) !default;
20
+ // scss-docs-end theme-text-map
21
+
22
+ // scss-docs-start theme-bg-subtle-map
23
+ $theme-colors-bg-subtle: (
24
+ "primary": $primary-bg-subtle,
25
+ "secondary": $secondary-bg-subtle,
26
+ "success": $success-bg-subtle,
27
+ "info": $info-bg-subtle,
28
+ "warning": $warning-bg-subtle,
29
+ "danger": $danger-bg-subtle,
30
+ "light": $light-bg-subtle,
31
+ "dark": $dark-bg-subtle,
32
+ ) !default;
33
+ // scss-docs-end theme-bg-subtle-map
34
+
35
+ // scss-docs-start theme-border-subtle-map
36
+ $theme-colors-border-subtle: (
37
+ "primary": $primary-border-subtle,
38
+ "secondary": $secondary-border-subtle,
39
+ "success": $success-border-subtle,
40
+ "info": $info-border-subtle,
41
+ "warning": $warning-border-subtle,
42
+ "danger": $danger-border-subtle,
43
+ "light": $light-border-subtle,
44
+ "dark": $dark-border-subtle,
45
+ ) !default;
46
+ // scss-docs-end theme-border-subtle-map
47
+
48
+ $theme-colors-text-dark: null !default;
49
+ $theme-colors-bg-subtle-dark: null !default;
50
+ $theme-colors-border-subtle-dark: null !default;
51
+
52
+ @if $enable-dark-mode {
53
+ // scss-docs-start theme-text-dark-map
54
+ $theme-colors-text-dark: (
55
+ "primary": $primary-text-emphasis-dark,
56
+ "secondary": $secondary-text-emphasis-dark,
57
+ "success": $success-text-emphasis-dark,
58
+ "info": $info-text-emphasis-dark,
59
+ "warning": $warning-text-emphasis-dark,
60
+ "danger": $danger-text-emphasis-dark,
61
+ "light": $light-text-emphasis-dark,
62
+ "dark": $dark-text-emphasis-dark,
63
+ ) !default;
64
+ // scss-docs-end theme-text-dark-map
65
+
66
+ // scss-docs-start theme-bg-subtle-dark-map
67
+ $theme-colors-bg-subtle-dark: (
68
+ "primary": $primary-bg-subtle-dark,
69
+ "secondary": $secondary-bg-subtle-dark,
70
+ "success": $success-bg-subtle-dark,
71
+ "info": $info-bg-subtle-dark,
72
+ "warning": $warning-bg-subtle-dark,
73
+ "danger": $danger-bg-subtle-dark,
74
+ "light": $light-bg-subtle-dark,
75
+ "dark": $dark-bg-subtle-dark,
76
+ ) !default;
77
+ // scss-docs-end theme-bg-subtle-dark-map
78
+
79
+ // scss-docs-start theme-border-subtle-dark-map
80
+ $theme-colors-border-subtle-dark: (
81
+ "primary": $primary-border-subtle-dark,
82
+ "secondary": $secondary-border-subtle-dark,
83
+ "success": $success-border-subtle-dark,
84
+ "info": $info-border-subtle-dark,
85
+ "warning": $warning-border-subtle-dark,
86
+ "danger": $danger-border-subtle-dark,
87
+ "light": $light-border-subtle-dark,
88
+ "dark": $dark-border-subtle-dark,
89
+ ) !default;
90
+ // scss-docs-end theme-border-subtle-dark-map
91
+ }
92
+
9
93
  // Utilities maps
10
94
  //
11
95
  // Extends the default `$theme-colors` maps to help create our utilities.
@@ -25,6 +109,17 @@ $utilities-text: map-merge(
25
109
  )
26
110
  ) !default;
27
111
  $utilities-text-colors: map-loop($utilities-text, rgba-css-var, "$key", "text") !default;
112
+
113
+ $utilities-text-emphasis-colors: (
114
+ "primary-emphasis": var(--#{$prefix}primary-text-emphasis),
115
+ "secondary-emphasis": var(--#{$prefix}secondary-text-emphasis),
116
+ "success-emphasis": var(--#{$prefix}success-text-emphasis),
117
+ "info-emphasis": var(--#{$prefix}info-text-emphasis),
118
+ "warning-emphasis": var(--#{$prefix}warning-text-emphasis),
119
+ "danger-emphasis": var(--#{$prefix}danger-text-emphasis),
120
+ "light-emphasis": var(--#{$prefix}light-text-emphasis),
121
+ "dark-emphasis": var(--#{$prefix}dark-text-emphasis)
122
+ ) !default;
28
123
  // scss-docs-end utilities-text-colors
29
124
 
30
125
  // scss-docs-start utilities-bg-colors
@@ -37,18 +132,43 @@ $utilities-bg: map-merge(
37
132
  )
38
133
  ) !default;
39
134
  $utilities-bg-colors: map-loop($utilities-bg, rgba-css-var, "$key", "bg") !default;
135
+
136
+ $utilities-bg-subtle: (
137
+ "primary-subtle": var(--#{$prefix}primary-bg-subtle),
138
+ "secondary-subtle": var(--#{$prefix}secondary-bg-subtle),
139
+ "success-subtle": var(--#{$prefix}success-bg-subtle),
140
+ "info-subtle": var(--#{$prefix}info-bg-subtle),
141
+ "warning-subtle": var(--#{$prefix}warning-bg-subtle),
142
+ "danger-subtle": var(--#{$prefix}danger-bg-subtle),
143
+ "light-subtle": var(--#{$prefix}light-bg-subtle),
144
+ "dark-subtle": var(--#{$prefix}dark-bg-subtle)
145
+ ) !default;
40
146
  // scss-docs-end utilities-bg-colors
41
147
 
42
148
  // scss-docs-start utilities-border-colors
43
149
  $utilities-border: map-merge(
44
150
  $utilities-colors,
45
151
  (
152
+ "black": to-rgb($black),
46
153
  "white": to-rgb($white)
47
154
  )
48
155
  ) !default;
49
156
  $utilities-border-colors: map-loop($utilities-border, rgba-css-var, "$key", "border") !default;
157
+
158
+ $utilities-border-subtle: (
159
+ "primary-subtle": var(--#{$prefix}primary-border-subtle),
160
+ "secondary-subtle": var(--#{$prefix}secondary-border-subtle),
161
+ "success-subtle": var(--#{$prefix}success-border-subtle),
162
+ "info-subtle": var(--#{$prefix}info-border-subtle),
163
+ "warning-subtle": var(--#{$prefix}warning-border-subtle),
164
+ "danger-subtle": var(--#{$prefix}danger-border-subtle),
165
+ "light-subtle": var(--#{$prefix}light-border-subtle),
166
+ "dark-subtle": var(--#{$prefix}dark-border-subtle)
167
+ ) !default;
50
168
  // scss-docs-end utilities-border-colors
51
169
 
170
+ $utilities-links-underline: map-loop($utilities-colors, rgba-css-var, "$key", "link-underline") !default;
171
+
52
172
  $negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;
53
173
 
54
174
  $gutters: $spacers !default;
@@ -10,6 +10,7 @@
10
10
 
11
11
  // Helpers
12
12
  @import "mixins/breakpoints";
13
+ @import "mixins/color-mode";
13
14
  @import "mixins/color-scheme";
14
15
  @import "mixins/image";
15
16
  @import "mixins/resize";
@@ -21,13 +22,11 @@
21
22
  @import "mixins/utilities";
22
23
 
23
24
  // Components
24
- @import "mixins/alert";
25
25
  @import "mixins/backdrop";
26
26
  @import "mixins/buttons";
27
27
  @import "mixins/caret";
28
28
  @import "mixins/pagination";
29
29
  @import "mixins/lists";
30
- @import "mixins/list-group";
31
30
  @import "mixins/forms";
32
31
  @import "mixins/table-variants";
33
32
 
@@ -28,6 +28,8 @@
28
28
  font-weight: var(--#{$prefix}nav-link-font-weight);
29
29
  color: var(--#{$prefix}nav-link-color);
30
30
  text-decoration: if($link-decoration == none, null, none);
31
+ background: none;
32
+ border: 0;
31
33
  @include transition($nav-link-transition);
32
34
 
33
35
  &:hover,
@@ -36,6 +38,11 @@
36
38
  text-decoration: if($link-hover-decoration == underline, none, null);
37
39
  }
38
40
 
41
+ &:focus-visible {
42
+ outline: 0;
43
+ box-shadow: $nav-link-focus-box-shadow;
44
+ }
45
+
39
46
  // Disabled state lightens text
40
47
  &.disabled {
41
48
  color: var(--#{$prefix}nav-link-disabled-color);
@@ -63,7 +70,6 @@
63
70
 
64
71
  .nav-link {
65
72
  margin-bottom: calc(-1 * var(--#{$prefix}nav-tabs-border-width)); // stylelint-disable-line function-disallowed-list
66
- background: none;
67
73
  border: var(--#{$prefix}nav-tabs-border-width) solid transparent;
68
74
  @include border-top-radius(var(--#{$prefix}nav-tabs-border-radius));
69
75
 
@@ -110,8 +116,6 @@
110
116
  // scss-docs-end nav-pills-css-vars
111
117
 
112
118
  .nav-link {
113
- background: none;
114
- border: 0;
115
119
  @include border-radius(var(--#{$prefix}nav-pills-border-radius));
116
120
 
117
121
  &:disabled {
@@ -129,6 +133,39 @@
129
133
  }
130
134
 
131
135
 
136
+ //
137
+ // Underline
138
+ //
139
+
140
+ .nav-underline {
141
+ // scss-docs-start nav-underline-css-vars
142
+ --#{$prefix}nav-underline-gap: #{$nav-underline-gap};
143
+ --#{$prefix}nav-underline-border-width: #{$nav-underline-border-width};
144
+ --#{$prefix}nav-underline-link-active-color: #{$nav-underline-link-active-color};
145
+ // scss-docs-end nav-underline-css-vars
146
+
147
+ gap: var(--#{$prefix}nav-underline-gap);
148
+
149
+ .nav-link {
150
+ padding-right: 0;
151
+ padding-left: 0;
152
+ border-bottom: var(--#{$prefix}nav-underline-border-width) solid transparent;
153
+
154
+ &:hover,
155
+ &:focus {
156
+ border-bottom-color: currentcolor;
157
+ }
158
+ }
159
+
160
+ .nav-link.active,
161
+ .show > .nav-link {
162
+ font-weight: $font-weight-bold;
163
+ color: var(--#{$prefix}nav-underline-link-active-color);
164
+ border-bottom-color: currentcolor;
165
+ }
166
+ }
167
+
168
+
132
169
  //
133
170
  // Justified variants
134
171
  //
@@ -100,9 +100,11 @@
100
100
  margin-bottom: 0;
101
101
  list-style: none;
102
102
 
103
- .show > .nav-link,
104
- .nav-link.active {
105
- color: var(--#{$prefix}navbar-active-color);
103
+ .nav-link {
104
+ &.active,
105
+ &.show {
106
+ color: var(--#{$prefix}navbar-active-color);
107
+ }
106
108
  }
107
109
 
108
110
  .dropdown-menu {
@@ -276,3 +278,11 @@
276
278
  --#{$prefix}navbar-toggler-icon-bg: #{escape-svg($navbar-dark-toggler-icon-bg)};
277
279
  // scss-docs-end navbar-dark-css-vars
278
280
  }
281
+
282
+ @if $enable-dark-mode {
283
+ @include color-mode(dark) {
284
+ .navbar-toggler-icon {
285
+ --#{$prefix}navbar-toggler-icon-bg: #{escape-svg($navbar-dark-toggler-icon-bg)};
286
+ }
287
+ }
288
+ }
@@ -12,6 +12,8 @@
12
12
  --#{$prefix}offcanvas-border-width: #{$offcanvas-border-width};
13
13
  --#{$prefix}offcanvas-border-color: #{$offcanvas-border-color};
14
14
  --#{$prefix}offcanvas-box-shadow: #{$offcanvas-box-shadow};
15
+ --#{$prefix}offcanvas-transition: #{transform $offcanvas-transition-duration ease-in-out};
16
+ --#{$prefix}offcanvas-title-line-height: #{$offcanvas-title-line-height};
15
17
  // scss-docs-end offcanvas-css-vars
16
18
  }
17
19
 
@@ -42,7 +44,7 @@
42
44
  background-clip: padding-box;
43
45
  outline: 0;
44
46
  @include box-shadow(var(--#{$prefix}offcanvas-box-shadow));
45
- @include transition(transform $offcanvas-transition-duration ease-in-out);
47
+ @include transition(var(--#{$prefix}offcanvas-transition));
46
48
 
47
49
  &.offcanvas-start {
48
50
  top: 0;
@@ -134,7 +136,7 @@
134
136
 
135
137
  .offcanvas-title {
136
138
  margin-bottom: 0;
137
- line-height: $offcanvas-title-line-height;
139
+ line-height: var(--#{$prefix}offcanvas-title-line-height);
138
140
  }
139
141
 
140
142
  .offcanvas-body {
@@ -75,7 +75,7 @@
75
75
  margin-left: $pagination-margin-start;
76
76
  }
77
77
 
78
- @if $pagination-margin-start == ($pagination-border-width * -1) {
78
+ @if $pagination-margin-start == calc(#{$pagination-border-width} * -1) {
79
79
  &:first-child {
80
80
  .page-link {
81
81
  @include border-start-radius(var(--#{$prefix}pagination-border-radius));
@@ -8,7 +8,8 @@
8
8
  }
9
9
  // scss-docs-end progress-keyframes
10
10
 
11
- .progress {
11
+ .progress,
12
+ .progress-stacked {
12
13
  // scss-docs-start progress-css-vars
13
14
  --#{$prefix}progress-height: #{$progress-height};
14
15
  @include rfs($progress-font-size, --#{$prefix}progress-font-size);
@@ -46,6 +47,14 @@
46
47
  background-size: var(--#{$prefix}progress-height) var(--#{$prefix}progress-height);
47
48
  }
48
49
 
50
+ .progress-stacked > .progress {
51
+ overflow: visible;
52
+ }
53
+
54
+ .progress-stacked > .progress > .progress-bar {
55
+ width: 100%;
56
+ }
57
+
49
58
  @if $enable-transitions {
50
59
  .progress-bar-animated {
51
60
  animation: $progress-bar-animation-timing progress-bar-stripes;
@@ -87,7 +87,7 @@ hr {
87
87
  font-style: $headings-font-style;
88
88
  font-weight: $headings-font-weight;
89
89
  line-height: $headings-line-height;
90
- color: $headings-color;
90
+ color: var(--#{$prefix}heading-color, inherit);
91
91
  }
92
92
 
93
93
  h1 {
@@ -241,11 +241,11 @@ sup { top: -.5em; }
241
241
  // Links
242
242
 
243
243
  a {
244
- color: var(--#{$prefix}link-color);
244
+ color: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-opacity, 1));
245
245
  text-decoration: $link-decoration;
246
246
 
247
247
  &:hover {
248
- color: var(--#{$prefix}link-hover-color);
248
+ --#{$prefix}link-color-rgb: var(--#{$prefix}link-hover-color-rgb);
249
249
  text-decoration: $link-hover-decoration;
250
250
  }
251
251
  }
@@ -1,4 +1,5 @@
1
- :root {
1
+ :root,
2
+ [data-bs-theme="light"] {
2
3
  // Note: Custom variable values only support SassScript inside `#{}`.
3
4
 
4
5
  // Colors
@@ -21,10 +22,20 @@
21
22
  --#{$prefix}#{$color}-rgb: #{$value};
22
23
  }
23
24
 
25
+ @each $color, $value in $theme-colors-text {
26
+ --#{$prefix}#{$color}-text-emphasis: #{$value};
27
+ }
28
+
29
+ @each $color, $value in $theme-colors-bg-subtle {
30
+ --#{$prefix}#{$color}-bg-subtle: #{$value};
31
+ }
32
+
33
+ @each $color, $value in $theme-colors-border-subtle {
34
+ --#{$prefix}#{$color}-border-subtle: #{$value};
35
+ }
36
+
24
37
  --#{$prefix}white-rgb: #{to-rgb($white)};
25
38
  --#{$prefix}black-rgb: #{to-rgb($black)};
26
- --#{$prefix}body-color-rgb: #{to-rgb($body-color)};
27
- --#{$prefix}body-bg-rgb: #{to-rgb($body-bg)};
28
39
 
29
40
  // Fonts
30
41
 
@@ -39,17 +50,51 @@
39
50
  @if $font-size-root != null {
40
51
  --#{$prefix}root-font-size: #{$font-size-root};
41
52
  }
42
- --#{$prefix}body-font-family: #{$font-family-base};
53
+ --#{$prefix}body-font-family: #{inspect($font-family-base)};
43
54
  @include rfs($font-size-base, --#{$prefix}body-font-size);
44
55
  --#{$prefix}body-font-weight: #{$font-weight-base};
45
56
  --#{$prefix}body-line-height: #{$line-height-base};
46
- --#{$prefix}body-color: #{$body-color};
47
57
  @if $body-text-align != null {
48
58
  --#{$prefix}body-text-align: #{$body-text-align};
49
59
  }
60
+
61
+ --#{$prefix}body-color: #{$body-color};
62
+ --#{$prefix}body-color-rgb: #{to-rgb($body-color)};
50
63
  --#{$prefix}body-bg: #{$body-bg};
64
+ --#{$prefix}body-bg-rgb: #{to-rgb($body-bg)};
65
+
66
+ --#{$prefix}emphasis-color: #{$body-emphasis-color};
67
+ --#{$prefix}emphasis-color-rgb: #{to-rgb($body-emphasis-color)};
68
+
69
+ --#{$prefix}secondary-color: #{$body-secondary-color};
70
+ --#{$prefix}secondary-color-rgb: #{to-rgb($body-secondary-color)};
71
+ --#{$prefix}secondary-bg: #{$body-secondary-bg};
72
+ --#{$prefix}secondary-bg-rgb: #{to-rgb($body-secondary-bg)};
73
+
74
+ --#{$prefix}tertiary-color: #{$body-tertiary-color};
75
+ --#{$prefix}tertiary-color-rgb: #{to-rgb($body-tertiary-color)};
76
+ --#{$prefix}tertiary-bg: #{$body-tertiary-bg};
77
+ --#{$prefix}tertiary-bg-rgb: #{to-rgb($body-tertiary-bg)};
51
78
  // scss-docs-end root-body-variables
52
79
 
80
+ @if $headings-color != null {
81
+ --#{$prefix}heading-color: #{$headings-color};
82
+ }
83
+
84
+ --#{$prefix}link-color: #{$link-color};
85
+ --#{$prefix}link-color-rgb: #{to-rgb($link-color)};
86
+ --#{$prefix}link-decoration: #{$link-decoration};
87
+
88
+ --#{$prefix}link-hover-color: #{$link-hover-color};
89
+ --#{$prefix}link-hover-color-rgb: #{to-rgb($link-hover-color)};
90
+
91
+ @if $link-hover-decoration != null {
92
+ --#{$prefix}link-hover-decoration: #{$link-hover-decoration};
93
+ }
94
+
95
+ --#{$prefix}code-color: #{$code-color};
96
+ --#{$prefix}highlight-bg: #{$mark-bg};
97
+
53
98
  // scss-docs-start root-border-var
54
99
  --#{$prefix}border-width: #{$border-width};
55
100
  --#{$prefix}border-style: #{$border-style};
@@ -60,14 +105,84 @@
60
105
  --#{$prefix}border-radius-sm: #{$border-radius-sm};
61
106
  --#{$prefix}border-radius-lg: #{$border-radius-lg};
62
107
  --#{$prefix}border-radius-xl: #{$border-radius-xl};
63
- --#{$prefix}border-radius-2xl: #{$border-radius-2xl};
108
+ --#{$prefix}border-radius-xxl: #{$border-radius-xxl};
109
+ --#{$prefix}border-radius-2xl: var(--#{$prefix}border-radius-xxl); // Deprecated in v5.3.0 for consistency
64
110
  --#{$prefix}border-radius-pill: #{$border-radius-pill};
65
111
  // scss-docs-end root-border-var
66
112
 
67
- --#{$prefix}link-color: #{$link-color};
68
- --#{$prefix}link-hover-color: #{$link-hover-color};
113
+ --#{$prefix}box-shadow: #{$box-shadow};
114
+ --#{$prefix}box-shadow-sm: #{$box-shadow-sm};
115
+ --#{$prefix}box-shadow-lg: #{$box-shadow-lg};
116
+ --#{$prefix}box-shadow-inset: #{$box-shadow-inset};
69
117
 
70
- --#{$prefix}code-color: #{$code-color};
118
+ // Focus styles
119
+ // scss-docs-start root-focus-variables
120
+ --#{$prefix}focus-ring-width: #{$focus-ring-width};
121
+ --#{$prefix}focus-ring-opacity: #{$focus-ring-opacity};
122
+ --#{$prefix}focus-ring-color: #{$focus-ring-color};
123
+ // scss-docs-end root-focus-variables
71
124
 
72
- --#{$prefix}highlight-bg: #{$mark-bg};
125
+ // scss-docs-start root-form-validation-variables
126
+ --#{$prefix}form-valid-color: #{$form-valid-color};
127
+ --#{$prefix}form-valid-border-color: #{$form-valid-border-color};
128
+ --#{$prefix}form-invalid-color: #{$form-invalid-color};
129
+ --#{$prefix}form-invalid-border-color: #{$form-invalid-border-color};
130
+ // scss-docs-end root-form-validation-variables
131
+ }
132
+
133
+ @if $enable-dark-mode {
134
+ @include color-mode(dark, true) {
135
+ color-scheme: dark;
136
+
137
+ // scss-docs-start root-dark-mode-vars
138
+ --#{$prefix}body-color: #{$body-color-dark};
139
+ --#{$prefix}body-color-rgb: #{to-rgb($body-color-dark)};
140
+ --#{$prefix}body-bg: #{$body-bg-dark};
141
+ --#{$prefix}body-bg-rgb: #{to-rgb($body-bg-dark)};
142
+
143
+ --#{$prefix}emphasis-color: #{$body-emphasis-color-dark};
144
+ --#{$prefix}emphasis-color-rgb: #{to-rgb($body-emphasis-color-dark)};
145
+
146
+ --#{$prefix}secondary-color: #{$body-secondary-color-dark};
147
+ --#{$prefix}secondary-color-rgb: #{to-rgb($body-secondary-color-dark)};
148
+ --#{$prefix}secondary-bg: #{$body-secondary-bg-dark};
149
+ --#{$prefix}secondary-bg-rgb: #{to-rgb($body-secondary-bg-dark)};
150
+
151
+ --#{$prefix}tertiary-color: #{$body-tertiary-color-dark};
152
+ --#{$prefix}tertiary-color-rgb: #{to-rgb($body-tertiary-color-dark)};
153
+ --#{$prefix}tertiary-bg: #{$body-tertiary-bg-dark};
154
+ --#{$prefix}tertiary-bg-rgb: #{to-rgb($body-tertiary-bg-dark)};
155
+
156
+ @each $color, $value in $theme-colors-text-dark {
157
+ --#{$prefix}#{$color}-text-emphasis: #{$value};
158
+ }
159
+
160
+ @each $color, $value in $theme-colors-bg-subtle-dark {
161
+ --#{$prefix}#{$color}-bg-subtle: #{$value};
162
+ }
163
+
164
+ @each $color, $value in $theme-colors-border-subtle-dark {
165
+ --#{$prefix}#{$color}-border-subtle: #{$value};
166
+ }
167
+
168
+ @if $headings-color-dark != null {
169
+ --#{$prefix}heading-color: #{$headings-color-dark};
170
+ }
171
+
172
+ --#{$prefix}link-color: #{$link-color-dark};
173
+ --#{$prefix}link-hover-color: #{$link-hover-color-dark};
174
+ --#{$prefix}link-color-rgb: #{to-rgb($link-color-dark)};
175
+ --#{$prefix}link-hover-color-rgb: #{to-rgb($link-hover-color-dark)};
176
+
177
+ --#{$prefix}code-color: #{$code-color-dark};
178
+
179
+ --#{$prefix}border-color: #{$border-color-dark};
180
+ --#{$prefix}border-color-translucent: #{$border-color-translucent-dark};
181
+
182
+ --#{$prefix}form-valid-color: #{$form-valid-color-dark};
183
+ --#{$prefix}form-valid-border-color: #{$form-valid-border-color-dark};
184
+ --#{$prefix}form-invalid-color: #{$form-invalid-color-dark};
185
+ --#{$prefix}form-invalid-border-color: #{$form-invalid-border-color-dark};
186
+ // scss-docs-end root-dark-mode-vars
187
+ }
73
188
  }
@@ -42,7 +42,7 @@
42
42
  }
43
43
 
44
44
  .table-group-divider {
45
- border-top: ($table-border-width * 2) solid $table-group-separator-color;
45
+ border-top: calc(#{$table-border-width} * 2) solid $table-group-separator-color; // stylelint-disable-line function-disallowed-list
46
46
  }
47
47
 
48
48
  //
@@ -17,7 +17,6 @@
17
17
 
18
18
  z-index: var(--#{$prefix}tooltip-zindex);
19
19
  display: block;
20
- padding: var(--#{$prefix}tooltip-arrow-height);
21
20
  margin: var(--#{$prefix}tooltip-margin);
22
21
  @include deprecate("`$tooltip-margin`", "v5", "v5.x", true);
23
22
  // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
@@ -45,7 +44,7 @@
45
44
  }
46
45
 
47
46
  .bs-tooltip-top .tooltip-arrow {
48
- bottom: 0;
47
+ bottom: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
49
48
 
50
49
  &::before {
51
50
  top: -1px;
@@ -56,7 +55,7 @@
56
55
 
57
56
  /* rtl:begin:ignore */
58
57
  .bs-tooltip-end .tooltip-arrow {
59
- left: 0;
58
+ left: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
60
59
  width: var(--#{$prefix}tooltip-arrow-height);
61
60
  height: var(--#{$prefix}tooltip-arrow-width);
62
61
 
@@ -70,7 +69,7 @@
70
69
  /* rtl:end:ignore */
71
70
 
72
71
  .bs-tooltip-bottom .tooltip-arrow {
73
- top: 0;
72
+ top: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
74
73
 
75
74
  &::before {
76
75
  bottom: -1px;
@@ -81,7 +80,7 @@
81
80
 
82
81
  /* rtl:begin:ignore */
83
82
  .bs-tooltip-start .tooltip-arrow {
84
- right: 0;
83
+ right: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
85
84
  width: var(--#{$prefix}tooltip-arrow-height);
86
85
  height: var(--#{$prefix}tooltip-arrow-width);
87
86