Skip to content

Commit

Permalink
🔧 Only hide show-case items if they are below the viewport
Browse files Browse the repository at this point in the history
  • Loading branch information
Schneegans committed Dec 1, 2024
1 parent c16437e commit a0b6dc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/ShowCase.astro
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
if (entry.isIntersecting) {
entry.target.classList.add('visible');
} else {
entry.target.classList.remove('visible');
if (entry.boundingClientRect.bottom > window.innerHeight) {
entry.target.classList.remove('visible');
}
}
});
},
Expand Down

0 comments on commit a0b6dc1

Please sign in to comment.