mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
Fix display issues of close button in contextual light and dark modes (#41126)
Some checks failed
BrowserStack / browserstack (push) Has been skipped
Bundlewatch / bundlewatch (push) Failing after 1s
CodeQL / Analyze (push) Failing after 1s
cspell / cspell (push) Failing after 1s
CSS / css (push) Failing after 1s
Docs / docs (push) Failing after 1s
JS Tests / JS Tests (push) Failing after 1s
Lint / lint (push) Failing after 1s
CSS (node-sass) / css (push) Failing after 1s
Release notes / update_release_draft (push) Has been skipped
Some checks failed
BrowserStack / browserstack (push) Has been skipped
Bundlewatch / bundlewatch (push) Failing after 1s
CodeQL / Analyze (push) Failing after 1s
cspell / cspell (push) Failing after 1s
CSS / css (push) Failing after 1s
Docs / docs (push) Failing after 1s
JS Tests / JS Tests (push) Failing after 1s
Lint / lint (push) Failing after 1s
CSS (node-sass) / css (push) Failing after 1s
Release notes / update_release_draft (push) Has been skipped
This commit is contained in:
parent
0cbfe13adf
commit
a5d430d526
@ -12,7 +12,6 @@
|
|||||||
--#{$prefix}btn-close-focus-shadow: #{$btn-close-focus-shadow};
|
--#{$prefix}btn-close-focus-shadow: #{$btn-close-focus-shadow};
|
||||||
--#{$prefix}btn-close-focus-opacity: #{$btn-close-focus-opacity};
|
--#{$prefix}btn-close-focus-opacity: #{$btn-close-focus-opacity};
|
||||||
--#{$prefix}btn-close-disabled-opacity: #{$btn-close-disabled-opacity};
|
--#{$prefix}btn-close-disabled-opacity: #{$btn-close-disabled-opacity};
|
||||||
--#{$prefix}btn-close-white-filter: #{$btn-close-white-filter};
|
|
||||||
// scss-docs-end close-css-vars
|
// scss-docs-end close-css-vars
|
||||||
|
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
@ -21,6 +20,7 @@
|
|||||||
padding: $btn-close-padding-y $btn-close-padding-x;
|
padding: $btn-close-padding-y $btn-close-padding-x;
|
||||||
color: var(--#{$prefix}btn-close-color);
|
color: var(--#{$prefix}btn-close-color);
|
||||||
background: transparent var(--#{$prefix}btn-close-bg) center / $btn-close-width auto no-repeat; // include transparent for button elements
|
background: transparent var(--#{$prefix}btn-close-bg) center / $btn-close-width auto no-repeat; // include transparent for button elements
|
||||||
|
filter: var(--#{$prefix}btn-close-filter);
|
||||||
border: 0; // for button elements
|
border: 0; // for button elements
|
||||||
@include border-radius();
|
@include border-radius();
|
||||||
opacity: var(--#{$prefix}btn-close-opacity);
|
opacity: var(--#{$prefix}btn-close-opacity);
|
||||||
@ -47,17 +47,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@mixin btn-close-white() {
|
@mixin btn-close-white() {
|
||||||
filter: var(--#{$prefix}btn-close-white-filter);
|
--#{$prefix}btn-close-filter: #{$btn-close-filter-dark};
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-close-white {
|
.btn-close-white {
|
||||||
@include btn-close-white();
|
@include btn-close-white();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:root,
|
||||||
|
[data-bs-theme="light"] {
|
||||||
|
--#{$prefix}btn-close-filter: #{$btn-close-filter};
|
||||||
|
}
|
||||||
|
|
||||||
@if $enable-dark-mode {
|
@if $enable-dark-mode {
|
||||||
@include color-mode(dark) {
|
@include color-mode(dark, true) {
|
||||||
.btn-close {
|
@include btn-close-white();
|
||||||
@include btn-close-white();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,3 +94,9 @@ $accordion-button-active-icon-dark: url("data:image/svg+xml,<svg xmlns='http://
|
|||||||
$carousel-indicator-active-bg-dark: $carousel-dark-indicator-active-bg !default;
|
$carousel-indicator-active-bg-dark: $carousel-dark-indicator-active-bg !default;
|
||||||
$carousel-caption-color-dark: $carousel-dark-caption-color !default;
|
$carousel-caption-color-dark: $carousel-dark-caption-color !default;
|
||||||
$carousel-control-icon-filter-dark: $carousel-dark-control-icon-filter !default;
|
$carousel-control-icon-filter-dark: $carousel-dark-control-icon-filter !default;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Close button
|
||||||
|
//
|
||||||
|
|
||||||
|
$btn-close-filter-dark: $btn-close-white-filter !default;
|
||||||
|
@ -1713,7 +1713,8 @@ $btn-close-opacity: .5 !default;
|
|||||||
$btn-close-hover-opacity: .75 !default;
|
$btn-close-hover-opacity: .75 !default;
|
||||||
$btn-close-focus-opacity: 1 !default;
|
$btn-close-focus-opacity: 1 !default;
|
||||||
$btn-close-disabled-opacity: .25 !default;
|
$btn-close-disabled-opacity: .25 !default;
|
||||||
$btn-close-white-filter: invert(1) grayscale(100%) brightness(200%) !default;
|
$btn-close-filter: null !default;
|
||||||
|
$btn-close-white-filter: invert(1) grayscale(100%) brightness(200%) !default; // Deprecated in v5.3.4
|
||||||
// scss-docs-end close-variables
|
// scss-docs-end close-variables
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user