1
0
Fork 0
hswro_org/_sass/bootstrap/mixins/_transition.scss

27 lines
661 B
SCSS
Raw Normal View History

2021-10-06 02:09:23 +00:00
// stylelint-disable property-disallowed-list
2018-12-09 07:21:01 +00:00
@mixin transition($transition...) {
2021-10-06 02:09:23 +00: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.";
}
}
}
2018-12-09 07:21:01 +00:00
@if $enable-transitions {
2021-10-06 02:09:23 +00:00
@if nth($transition, 1) != null {
2018-12-09 07:21:01 +00:00
transition: $transition;
}
2020-08-23 10:01:06 +00:00
2023-11-26 06:34:29 +00:00
@if $enable-reduced-motion and nth($transition, 1) != null and nth($transition, 1) != none {
2021-10-06 02:09:23 +00:00
@media (prefers-reduced-motion: reduce) {
transition: none;
}
2020-08-23 10:01:06 +00:00
}
}
2018-12-09 07:21:01 +00:00
}