0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00
Bootstrap/scss/mixins/_color-scheme.scss

18 lines
370 B
SCSS
Raw Normal View History

2021-01-12 06:02:26 +01:00
// 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