|
99 | 99 | color: $carousel-control-color; |
100 | 100 | text-align: center; |
101 | 101 | background: none; |
| 102 | + filter: var(--#{$prefix}carousel-control-icon-filter); |
102 | 103 | border: 0; |
103 | 104 | opacity: $carousel-control-opacity; |
104 | 105 | @include transition($carousel-control-transition); |
|
168 | 169 | margin-left: $carousel-indicator-spacer; |
169 | 170 | text-indent: -999px; |
170 | 171 | cursor: pointer; |
171 | | - background-color: $carousel-indicator-active-bg; |
| 172 | + background-color: var(--#{$prefix}carousel-indicator-active-bg); |
172 | 173 | background-clip: padding-box; |
173 | 174 | border: 0; |
174 | 175 | // Use transparent borders to increase the hit area by 10px on top and bottom. |
|
195 | 196 | left: (100% - $carousel-caption-width) * .5; |
196 | 197 | padding-top: $carousel-caption-padding-y; |
197 | 198 | padding-bottom: $carousel-caption-padding-y; |
198 | | - color: $carousel-caption-color; |
| 199 | + color: var(--#{$prefix}carousel-caption-color); |
199 | 200 | text-align: center; |
200 | 201 | } |
201 | 202 |
|
202 | 203 | // Dark mode carousel |
203 | 204 |
|
204 | 205 | @mixin carousel-dark() { |
205 | | - .carousel-control-prev-icon, |
206 | | - .carousel-control-next-icon { |
207 | | - filter: $carousel-dark-control-icon-filter; |
208 | | - } |
209 | | - |
210 | | - .carousel-indicators [data-bs-target] { |
211 | | - background-color: $carousel-dark-indicator-active-bg; |
212 | | - } |
213 | | - |
214 | | - .carousel-caption { |
215 | | - color: $carousel-dark-caption-color; |
216 | | - } |
| 206 | + --#{$prefix}carousel-indicator-active-bg: #{$carousel-indicator-active-bg-dark}; |
| 207 | + --#{$prefix}carousel-caption-color: #{$carousel-caption-color-dark}; |
| 208 | + --#{$prefix}carousel-control-icon-filter: #{$carousel-control-icon-filter-dark}; |
217 | 209 | } |
218 | 210 |
|
219 | 211 | .carousel-dark { |
220 | 212 | @include carousel-dark(); |
221 | 213 | } |
222 | 214 |
|
| 215 | +:root, |
| 216 | +[data-bs-theme="light"] { |
| 217 | + --#{$prefix}carousel-indicator-active-bg: #{$carousel-indicator-active-bg}; |
| 218 | + --#{$prefix}carousel-caption-color: #{$carousel-caption-color}; |
| 219 | + --#{$prefix}carousel-control-icon-filter: #{$carousel-control-icon-filter}; |
| 220 | +} |
| 221 | + |
223 | 222 | @if $enable-dark-mode { |
224 | | - @include color-mode(dark) { |
225 | | - @if $color-mode-type == "media-query" { |
226 | | - .carousel { |
227 | | - @include carousel-dark(); |
228 | | - } |
229 | | - } @else { |
230 | | - .carousel, |
231 | | - &.carousel { |
232 | | - @include carousel-dark(); |
233 | | - } |
234 | | - } |
| 223 | + @include color-mode(dark, true) { |
| 224 | + @include carousel-dark(); |
235 | 225 | } |
236 | 226 | } |
0 commit comments