From f2dc4ec647f177133deb47e97210fe2604ada4bb Mon Sep 17 00:00:00 2001 From: Ruben Date: Sat, 7 Feb 2026 17:54:42 +0100 Subject: [PATCH] Add scroll reveal effect to news preview cards --- custom/plugins/page/news-preview.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/custom/plugins/page/news-preview.php b/custom/plugins/page/news-preview.php index 8d10c36..2f5918a 100644 --- a/custom/plugins/page/news-preview.php +++ b/custom/plugins/page/news-preview.php @@ -253,6 +253,15 @@ function newsPreviewGetStyles(): string { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: .5rem; + mask-image: linear-gradient(to right, black calc(100% - 3rem), transparent); + mask-size: 200% 100%; + mask-position: right; + transition: mask-position .2s ease; + } + + .news-preview-scroll:hover, + .news-preview-scroll:active { + mask-position: left; } .news-preview-card {