This commit is contained in:
Chris Qiang 2025-05-02 08:45:36 +00:00 committed by GitHub
commit 9383946536
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 1 deletions

View File

@ -13,7 +13,8 @@
}
}
} @else {
[data-bs-theme="#{$mode}"] {
$parent-selector: &;
@at-root [data-bs-theme="#{$mode}"] #{$parent-selector} {
@content;
}
}

View File

@ -30,6 +30,30 @@
}
}
}
@include assert() {
@include output() {
.parent {
@include color-mode(dark) {
.element {
color: var(--bs-primary-text-emphasis);
background-color: var(--bs-primary-bg-subtle);
}
}
@include color-mode(dark, true) {
--custom-color: #{mix($indigo, $blue, 50%)};
}
}
}
@include expect() {
[data-bs-theme=dark] .parent .element {
color: var(--bs-primary-text-emphasis);
background-color: var(--bs-primary-bg-subtle);
}
[data-bs-theme=dark] .parent {
--custom-color: #3a3ff8;
}
}
}
}
}