Skip to content

Commit

Permalink
Fine-tune the slideIn animation (#2499)
Browse files Browse the repository at this point in the history
* Fine-tune the slideIn animation.

* Adjust speed of the animation.

* Use cubic-bezier easing.

* Slow down the animation very slightly.
  • Loading branch information
kjellr authored Apr 11, 2023
1 parent 61a862d commit f4cd8a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ details > * {
--duration-default: 200ms;
--duration-long: 500ms;
--duration-extra-long: 600ms;
--animation-slide-in: slideIn var(--duration-extra-long) ease-out forwards;
--animation-slide-in: slideIn var(--duration-extra-long) cubic-bezier(0,0,.3,1) forwards;
}

.underlined-link,
Expand Down Expand Up @@ -3289,7 +3289,7 @@ details-disclosure > details {

.scroll-trigger--active.animate--slide-in {
animation: var(--animation-slide-in);
animation-delay: calc(var(--animation-order) * 100ms);
animation-delay: calc(var(--animation-order) * 75ms);
}

/* Turn off animations if JS is turned off. */
Expand All @@ -3301,7 +3301,7 @@ details-disclosure > details {

@keyframes slideIn {
from {
transform: translateY(10vh);
transform: translateY(2rem);
opacity: 0;
}
to {
Expand Down

0 comments on commit f4cd8a1

Please sign in to comment.