Skip to content

Commit

Permalink
Add accordions
Browse files Browse the repository at this point in the history
  • Loading branch information
louismaximepiton committed Sep 20, 2023
1 parent 1ad2b7d commit 2ead11f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions scss/_accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
// scss-docs-end accordion-lg-css-vars
}

// Deprecated in v5.3.2
.accordion-dark {
// scss-docs-start accordion-dark-css-vars
--#{$prefix}accordion-btn-color: #{$accordion-dark-button-color};
Expand Down
18 changes: 10 additions & 8 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,7 @@ $accordion-color: var(--#{$prefix}body-color) !default;
$accordion-bg: var(--#{$prefix}body-bg) !default;
// stylelint-disable-next-line function-disallowed-list
$accordion-border-width: calc(var(--#{$prefix}border-width) * .5) !default; // Boosted mod
$accordion-border-color: $gray-500 !default; // Boosted mod
$accordion-border-color: var(--#{$prefix}border-color-translucent) !default; // Boosted mod
$accordion-border-radius: var(--#{$prefix}border-radius) !default;
$accordion-inner-border-radius: subtract($accordion-border-radius, #{$accordion-border-width}) !default;

Expand Down Expand Up @@ -1764,15 +1764,17 @@ $accordion-button-letter-spacing-lg: $h2-spacing !default;
// End mod
// scss-docs-end accordion-variables

// Boosted mod
// scss-docs-start accordion-dark-variables
$accordion-dark-color: $white !default; // Boosted mod
$accordion-dark-bg: $black !default; // Boosted mod
$accordion-dark-border-color: $gray-700 !default; // Boosted mod
$accordion-dark-button-color: $accordion-dark-color !default; // Boosted mod
$accordion-dark-button-bg: $accordion-dark-bg !default; // Boosted mod
$accordion-dark-button-hover-bg: $gray-900 !default; // Boosted mod
$accordion-dark-button-active-color: $white !default; // Boosted mod
$accordion-dark-color: $white !default; // Deprecated in v5.3.2
$accordion-dark-bg: $black !default; // Deprecated in v5.3.2
$accordion-dark-border-color: $gray-700 !default; // Deprecated in v5.3.2
$accordion-dark-button-color: $accordion-dark-color !default; // Deprecated in v5.3.2
$accordion-dark-button-bg: $accordion-dark-bg !default; // Deprecated in v5.3.2
$accordion-dark-button-hover-bg: $gray-900 !default; // Deprecated in v5.3.2
$accordion-dark-button-active-color: $white !default; // Deprecated in v5.3.2
// scss-docs-end accordion-dark-variables
// End mod

// Tooltips

Expand Down
6 changes: 6 additions & 0 deletions site/content/docs/5.3/components/accordion.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ Omit the `data-bs-parent` attribute on each `.accordion-collapse` to make accord

## Dark variant

{{< deprecated-in "5.3.2" >}}

{{< callout warning >}}
New dark accordions in v5.3.2 — We’ve deprecated `.accordion-dark` in favor of the new `data-bs-theme="dark"`. Add `data-bs-theme="dark"` to the `.accordion` or any ancestor element to enable a component-specific color mode. [Learn more about our color modes]({{< docsref "/customize/color-modes" >}}).
{{< /callout >}}

{{< added-in "5.2.0" >}}

Add `.accordion-dark` to the `.accordion` for a dark variant.
Expand Down

0 comments on commit 2ead11f

Please sign in to comment.