fix: show modal close button with correct color in dark mode

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-03-27 14:54:30 +02:00
parent 3dc60407b6
commit 438a5466e0
3 changed files with 7 additions and 2 deletions

View file

@ -10,12 +10,12 @@
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
.btn-close { .btn-close {
color: $btn-close-color; color: var(--bs-modal-color);
background: transparent escape-svg($btn-close-bg) center / $btn-close-width auto no-repeat; // include transparent for button elements background: transparent escape-svg($btn-close-bg) center / $btn-close-width auto no-repeat; // include transparent for button elements
// Override <a>'s hover style // Override <a>'s hover style
&:hover { &:hover {
color: $btn-close-color; color: var(--bs-modal-color);
} }
&:focus { &:focus {

View file

@ -23,4 +23,8 @@ body.dark {
--#{$prefix}body-bg: #{$body-bg}; --#{$prefix}body-bg: #{$body-bg};
@import "colors-only-bootstrap/bootstrap"; @import "colors-only-bootstrap/bootstrap";
.btn-close {
filter: invert(1);
}
} }

View file

@ -103,6 +103,7 @@ $toast-background-color: $gray-700;
$toast-header-background-color: $gray-800; $toast-header-background-color: $gray-800;
// Modals // Modals
$modal-content-color: $dark;
$modal-content-bg: $gray-800; $modal-content-bg: $gray-800;
$modal-content-border-color: $gray-700; $modal-content-border-color: $gray-700;
$modal-header-border-color: $gray-700; $modal-header-border-color: $gray-700;