From 6590b9f0f75773942155619cd231c0b73bc0678c Mon Sep 17 00:00:00 2001 From: Louis-Maxime Piton Date: Fri, 27 Oct 2023 09:38:45 +0200 Subject: [PATCH] Dark mode: Carousel (#2316) --- scss/_carousel.scss | 3 +- scss/_variables.scss | 4 +- site/content/docs/5.3/dark-mode.md | 242 +++++++++++++++++++++++++++++ 3 files changed, 247 insertions(+), 2 deletions(-) diff --git a/scss/_carousel.scss b/scss/_carousel.scss index d7147b7bbe..eecc2466de 100644 --- a/scss/_carousel.scss +++ b/scss/_carousel.scss @@ -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); @@ -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 diff --git a/scss/_variables.scss b/scss/_variables.scss index 3974877077..51e95c375e 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -2131,7 +2131,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; @@ -2140,6 +2141,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; diff --git a/site/content/docs/5.3/dark-mode.md b/site/content/docs/5.3/dark-mode.md index 5fd04c5d3b..bfb1e03bb1 100644 --- a/site/content/docs/5.3/dark-mode.md +++ b/site/content/docs/5.3/dark-mode.md @@ -860,6 +860,248 @@ sitemap_exclude: true
+### Carousel + +

No theme

+ +
+ +
+ +

Dark theme on container

+ +
+ +
+ +

Light theme on container

+ +
+ +
+ +

Dark theme on component

+ +
+ +
+ +

Light theme on component

+ +
+ +
+ ### Close button

No theme