0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-26 23:54:23 +01:00
Bootstrap/scss/mixins/_transition.scss
Julien Déramond 035f143a48
All checks were successful
BrowserStack / browserstack (push) Has been skipped
More modifications
2024-07-31 08:34:35 +02:00

30 lines
737 B
SCSS

@use "sass:list";
@use "../setup/variables" as *;
// stylelint-disable property-disallowed-list
@mixin transition($transition...) {
@if list.length($transition) == 0 {
$transition: $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 $enable-transitions {
@if list.nth($transition, 1) != null {
transition: $transition;
}
@if $enable-reduced-motion and list.nth($transition, 1) != null and list.nth($transition, 1) != none {
@media (prefers-reduced-motion: reduce) {
transition: none;
}
}
}
}