Skip to content

Commit

Permalink
Add color mode on Close buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
louismaximepiton committed Oct 25, 2023
1 parent 1dcca3d commit 033789e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2174,9 +2174,9 @@ $btn-close-focus-shadow: $btn-focus-box-shadow !default; // Deprecated in

// Boosted mod
$btn-close-hover-color: $btn-close-color !default;
$btn-close-active-color: $primary !default;
$btn-close-active-border-color: $gray-500 !default;
$btn-close-disabled-color: $gray-500 !default;
$btn-close-active-color: var(--#{$prefix}link-hover-color) !default;
$btn-close-active-border-color: var(--#{$prefix}border-color-translucent) !default;
$btn-close-disabled-color: var(--#{$prefix}disabled-color) !default;

$btn-close-icon-size: 1rem auto !default;
$btn-close-padding-sm: subtract($btn-icon-padding-x, $spacer * .25) !default;
Expand Down
37 changes: 37 additions & 0 deletions site/content/docs/5.3/dark-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -2951,3 +2951,40 @@ sitemap_exclude: true
<input class="form-check-input" type="checkbox" role="switch" checked disabled>
</div>
</div>

### Close button

<h4 class="mt-3">No theme</h4>

<div class="border border-tertiary p-3">
<button type="button" class="btn-close" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"><span class="visually-hidden">Close</span></button>
<button type="button" class="btn-close" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close" disabled><span class="visually-hidden">Close</span></button>
</div>

<h4 class="mt-3">Dark theme on container</h4>

<div class="border border-tertiary p-3 bg-body" data-bs-theme="dark">
<button type="button" class="btn-close" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"><span class="visually-hidden">Close</span></button>
<button type="button" class="btn-close" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close" disabled><span class="visually-hidden">Close</span></button>
</div>

<h4 class="mt-3">Light theme on container</h4>

<div class="border border-tertiary p-3 bg-body" data-bs-theme="light">
<button type="button" class="btn-close" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"><span class="visually-hidden">Close</span></button>
<button type="button" class="btn-close" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close" disabled><span class="visually-hidden">Close</span></button>
</div>

<h4 class="mt-3">Dark theme on component</h4>

<div class="border border-tertiary p-3" style="background-color: #282d55;">
<button type="button" class="btn-close" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close" data-bs-theme="dark"><span class="visually-hidden">Close</span></button>
<button type="button" class="btn-close" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close" data-bs-theme="dark" disabled><span class="visually-hidden">Close</span></button>
</div>

<h4 class="mt-3">Light theme on component</h4>

<div class="border border-tertiary p-3" style="background-color: #b5e8f7">
<button type="button" class="btn-close" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close" data-bs-theme="light"><span class="visually-hidden">Close</span></button>
<button type="button" class="btn-close" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close" data-bs-theme="light" disabled><span class="visually-hidden">Close</span></button>
</div>

0 comments on commit 033789e

Please sign in to comment.