2024-07-29 22:04:11 -07:00
|
|
|
@use "sass:list";
|
|
|
|
@use "../variables";
|
|
|
|
|
2020-09-28 14:57:48 +03:00
|
|
|
// stylelint-disable property-disallowed-list
|
2017-03-03 11:34:10 -08:00
|
|
|
@mixin transition($transition...) {
|
2024-07-29 22:04:11 -07:00
|
|
|
@if list.length($transition) == 0 {
|
|
|
|
$transition: variables.$transition-base;
|
2020-04-01 15:42:33 +09:00
|
|
|
}
|
|
|
|
|
2024-07-29 22:04:11 -07:00
|
|
|
@if list.length($transition) > 1 {
|
2020-04-01 15:42:33 +09:00
|
|
|
@each $value in $transition {
|
|
|
|
@if $value == null or $value == none {
|
|
|
|
@warn "The keyword 'none' or 'null' must be used as a single argument.";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-29 22:04:11 -07:00
|
|
|
@if variables.$enable-transitions {
|
|
|
|
@if list.nth($transition, 1) != null {
|
2017-03-03 11:34:10 -08:00
|
|
|
transition: $transition;
|
|
|
|
}
|
2018-03-20 09:28:21 +00:00
|
|
|
|
2024-07-29 22:04:11 -07:00
|
|
|
@if variables.$enable-reduced-motion and list.nth($transition, 1) != null and list.nth($transition, 1) != none {
|
2020-02-17 16:46:53 +09:00
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
|
|
transition: none;
|
|
|
|
}
|
2018-11-03 19:23:26 +01:00
|
|
|
}
|
2018-03-20 09:28:21 +00:00
|
|
|
}
|
2017-03-03 11:34:10 -08:00
|
|
|
}
|