Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
royalfig committed Jul 10, 2023
1 parent 50592be commit 7f2038c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions assets/css/components/card.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
color: #fff;
border-radius: var(--radius);
opacity: 0;
transition: opacity 0.2s linear;
transition: opacity 0.35s linear;
}

@supports (prefers-reduced-motion: reduce) {
Expand Down Expand Up @@ -251,7 +251,7 @@
background-color: var(--surface-light);
border-radius: var(--radius);
opacity: 0;
transition: opacity 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
transition: opacity 0.35s linear;
}

@media (--tablet) {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function animateOnScroll() {
entries.forEach((entry) => {
const el = entry.target;
const ratio = entry.intersectionRatio;
el.style.opacity = ratio + 0.25;
el.style.opacity = ratio > 0.5 ? ratio + 0.25 : ratio - 0.5;
});
},
{ threshold: [0, 0.25, 0.5, 0.75, 1] },
Expand Down

0 comments on commit 7f2038c

Please sign in to comment.