4
0

_mixins.scss 702 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. @use "sass:list";
  2. /* stylelint-disable property-no-vendor-prefix */
  3. /* FUNCTIONS */
  4. //animation
  5. @mixin transition($target, $duration, $ease) {
  6. transition: $target $duration $ease;
  7. }
  8. //animation
  9. @mixin animation-delay($delay) {
  10. animation-delay: $delay;
  11. }
  12. //animation
  13. @mixin animation($animate...) {
  14. $max: list.length($animate);
  15. $animations: '';
  16. @for $i from 1 through $max {
  17. $animations: #{$animations + list.nth($animate, $i)};
  18. @if $i < $max {
  19. $animations: #{$animations + ", "};
  20. }
  21. }
  22. animation: #{$animations};
  23. }
  24. //keyframes
  25. @mixin keyframes($animationName) {
  26. @keyframes #{$animationName} {
  27. @content;
  28. }
  29. }
  30. @mixin border-radius($radius: 4px) {
  31. border-radius: $radius;
  32. }