Skip to content

Commit

Permalink
add scroll animation to image banner and image with text (#2362)
Browse files Browse the repository at this point in the history
* add animation to Image banner and Image with text
  • Loading branch information
metamoni committed Mar 30, 2023
1 parent cb58ed2 commit 5244e8f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions assets/section-image-banner.css
Original file line number Diff line number Diff line change
Expand Up @@ -452,3 +452,17 @@
color: currentColor;
}
}

@media (prefers-reduced-motion: no-preference) {
.banner.scroll-trigger,
.banner.scroll-trigger:after,
.banner__media.scroll-trigger {
opacity: 0;
transition: opacity var(--duration-extra-long) ease-out;
}

.banner.scroll-trigger--active,
.banner__media.scroll-trigger--active {
opacity: 1;
}
}

0 comments on commit 5244e8f

Please sign in to comment.