mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
41f62c5a11
* Fix Sass compilation when `$color-mode-type` is set to `media-query` * Update mixin names, fix docs color modes for using media queries by using mixin Co-authored-by: Mark Otto <markdotto@gmail.com>
22 lines
447 B
SCSS
22 lines
447 B
SCSS
// scss-docs-start color-mode-mixin
|
|
@mixin color-mode($mode: light, $root: false) {
|
|
@if $color-mode-type == "media-query" {
|
|
@if $root == true {
|
|
@media (prefers-color-scheme: $mode) {
|
|
:root {
|
|
@content;
|
|
}
|
|
}
|
|
} @else {
|
|
@media (prefers-color-scheme: $mode) {
|
|
@content;
|
|
}
|
|
}
|
|
} @else {
|
|
[data-bs-theme="#{$mode}"] {
|
|
@content;
|
|
}
|
|
}
|
|
}
|
|
// scss-docs-end color-mode-mixin
|