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

28 lines
594 B
SCSS
Raw Normal View History

// stylelint-disable property-blacklist
@mixin transition($transition...) {
@if $enable-transitions {
@if length($transition) == 0 {
transition: $transition-base;
} @else {
transition: $transition;
}
}
@if $enable-prefers-reduced-motion-media-query {
$isolate: false;
@each $selector in $pseudo-vendor-prefixes {
@if str-index(quote(#{&}), $selector) {
$isolate: true;
}
}
@if $isolate {
@media (prefers-reduced-motion: reduce) {
transition: none;
}
} @else {
@extend %no-transition;
}
}
}