mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-23 20:54:22 +01:00
30 lines
756 B
SCSS
30 lines
756 B
SCSS
@use "sass:list";
|
|
@use "../variables";
|
|
|
|
// stylelint-disable property-disallowed-list
|
|
@mixin transition($transition...) {
|
|
@if list.length($transition) == 0 {
|
|
$transition: variables.$transition-base;
|
|
}
|
|
|
|
@if list.length($transition) > 1 {
|
|
@each $value in $transition {
|
|
@if $value == null or $value == none {
|
|
@warn "The keyword 'none' or 'null' must be used as a single argument.";
|
|
}
|
|
}
|
|
}
|
|
|
|
@if variables.$enable-transitions {
|
|
@if list.nth($transition, 1) != null {
|
|
transition: $transition;
|
|
}
|
|
|
|
@if variables.$enable-reduced-motion and list.nth($transition, 1) != null and list.nth($transition, 1) != none {
|
|
@media (prefers-reduced-motion: reduce) {
|
|
transition: none;
|
|
}
|
|
}
|
|
}
|
|
}
|