mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
18 lines
370 B
SCSS
18 lines
370 B
SCSS
|
// scss-docs-start mixin-color-scheme
|
||
|
@mixin color-scheme($name) {
|
||
|
@if $name == dark {
|
||
|
@media (prefers-color-scheme: dark) {
|
||
|
@content;
|
||
|
}
|
||
|
} @else if $name == light {
|
||
|
@media (prefers-color-scheme: light) {
|
||
|
@content;
|
||
|
}
|
||
|
} @else {
|
||
|
@media (prefers-color-scheme: #{$name}) {
|
||
|
@content;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
// scss-docs-end mixin-color-scheme
|