Skip to content

Commit

Permalink
Add color mode on carousel
Browse files Browse the repository at this point in the history
  • Loading branch information
louismaximepiton committed Oct 18, 2023
1 parent bd524f0 commit 5b49197
Show file tree
Hide file tree
Showing 4 changed files with 304 additions and 59 deletions.
3 changes: 2 additions & 1 deletion scss/_carousel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@

.carousel-control-play-pause {
margin-bottom: $carousel-indicators-margin-bottom;
color: $carousel-control-icon-color;
background: rgba($carousel-indicator-active-bg, .5);
border: 0;
@include border-radius($spacer, $spacer);
Expand Down Expand Up @@ -354,7 +355,7 @@
left: (100% - $carousel-caption-width) * .5;
padding: $carousel-caption-padding-y $carousel-caption-padding-x; // Boosted mod
color: $carousel-caption-color;
background-color: color-contrast($carousel-caption-color); // Boosted mod: ensure contrast
background-color: $carousel-caption-bg; // Boosted mod
}

// Boosted mod: no dark carousel nor carousel in dark mode since Boosted doesn't have any dark mode for now
Expand Down
2 changes: 1 addition & 1 deletion scss/_variables-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ $body-tertiary-bg-dark: $black !default; // Boosted mod: instead of
$body-emphasis-color-dark: $white !default; // Boosted mod: instead of `$gray-100`
$border-color-dark: $gray-700 !default;
$border-color-translucent-dark: $gray-700 !default; // Boosted mod instead of `rgba($white, .15)`
$headings-color-dark: $white !default; // Boosted mod: instead of `inherit`
$headings-color-dark: inherit !default;
$link-color-dark: $white !default; // Boosted mod: instead of `tint-color($primary, 40%)`
$link-hover-color-dark: $primary !default; // Boosted mod: instead of `shift-color($link-color-dark, -$link-shade-percentage)`
$code-color-dark: tint-color($code-color, 40%) !default;
Expand Down
4 changes: 3 additions & 1 deletion scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,8 @@ $carousel-indicators-margin-bottom: $spacer !default;
// End mod

$carousel-caption-width: 70% !default;
$carousel-caption-color: $black !default;
$carousel-caption-color: var(--#{$prefix}body-color) !default;
$carousel-caption-bg: var(--#{$prefix}body-bg) !default; // Boosted mod
$carousel-caption-padding-y: $spacer !default;
$carousel-caption-padding-x: $spacer !default; // Boosted mod
$carousel-caption-spacer: $spacer * 3 !default;
Expand All @@ -2089,6 +2090,7 @@ $carousel-control-icon-width: 2.5rem !default;
// Boosted mod
$carousel-control-icon-size: 1rem 1.5rem !default;
$carousel-control-icon-bg: var(--#{$prefix}chevron-icon) !default;
$carousel-control-icon-color: $black !default; // Boosted mod
$carousel-control-icon-active-bg: $component-active-bg !default;

$carousel-control-pause-indicators-spacing: 10px !default;
Expand Down
Loading

0 comments on commit 5b49197

Please sign in to comment.