2020-09-28 19:57:48 +08:00
|
|
|
// stylelint-disable property-disallowed-list
|
2017-03-04 03:34:10 +08:00
|
|
|
@mixin transition($transition...) {
|
2020-04-01 14:42:33 +08:00
|
|
|
@if length($transition) == 0 {
|
|
|
|
$transition: $transition-base;
|
|
|
|
}
|
|
|
|
|
|
|
|
@if 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.";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-04 03:34:10 +08:00
|
|
|
@if $enable-transitions {
|
2020-04-01 14:42:33 +08:00
|
|
|
@if nth($transition, 1) != null {
|
2017-03-04 03:34:10 +08:00
|
|
|
transition: $transition;
|
|
|
|
}
|
2018-03-20 17:28:21 +08:00
|
|
|
|
2020-04-14 08:48:19 +08:00
|
|
|
@if $enable-reduced-motion and nth($transition, 1) != null and nth($transition, 1) != none {
|
2020-02-17 15:46:53 +08:00
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
|
|
transition: none;
|
|
|
|
}
|
2018-11-04 02:23:26 +08:00
|
|
|
}
|
2018-03-20 17:28:21 +08:00
|
|
|
}
|
2017-03-04 03:34:10 +08:00
|
|
|
}
|