Skip to content

Commit

Permalink
Fix: Add variable for .on-screen-anim() mixin's transition-delay (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
swashbuck authored Apr 17, 2023
1 parent ad2a921 commit ca68ffd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions less/_defaults/_animations.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@duration: 0.2s;
@progress-duration: 0.5s;

@animation-delay: 1s;
@animation-duration: 2000ms;
@animation-easing: cubic-bezier(.23,1,.32,1);

Expand Down Expand Up @@ -51,10 +52,10 @@
// _onScreen animation mixin for 'fade-in-top', 'fade-in-bottom',
// 'fade-in-left', and 'fade-in-right'
// --------------------------------------------------
.on-screen-anim(fade-in-top; 0; 1; 1s; translateY(-100px); translateY(0));
.on-screen-anim(fade-in-bottom; 0; 1; 1s; translateY(100px); translateY(0));
.on-screen-anim(fade-in-left; 0; 1; 1s; translateX(-100px); translateX(0));
.on-screen-anim(fade-in-right; 0; 1; 1s; translateX(100px); translateX(0));
.on-screen-anim(fade-in-top; 0; 1; @animation-delay; translateY(-100px); translateY(0));
.on-screen-anim(fade-in-bottom; 0; 1; @animation-delay; translateY(100px); translateY(0));
.on-screen-anim(fade-in-left; 0; 1; @animation-delay; translateX(-100px); translateX(0));
.on-screen-anim(fade-in-right; 0; 1; @animation-delay; translateX(100px); translateX(0));

.on-screen-anim(@selector; @opacity-before; @opacity-after; @transition-delay; @transform-before; @transform-after) {
.@{selector}-before > div {
Expand Down

0 comments on commit ca68ffd

Please sign in to comment.