_transition.scss 681 B

1234567891011121314151617181920212223242526
  1. // stylelint-disable property-disallowed-list
  2. @mixin transition($transition...) {
  3. @if length($transition) == 0 {
  4. $transition: $transition-base;
  5. }
  6. @if length($transition) > 1 {
  7. @each $value in $transition {
  8. @if $value == null or $value == none {
  9. @warn "The keyword 'none' or 'null' must be used as a single argument.";
  10. }
  11. }
  12. }
  13. @if $enable-transitions {
  14. @if nth($transition, 1) != null {
  15. transition: $transition;
  16. }
  17. @if $enable-prefers-reduced-motion-media-query and nth($transition, 1) != null and nth($transition, 1) != none {
  18. @media (prefers-reduced-motion: reduce) {
  19. transition: none;
  20. }
  21. }
  22. }
  23. }