Re: [csswg-drafts] [css-view-transitions-2] Ignore offscreen elements from participating in transitions (#8282)

As far as the OP goes, this is achievable today using scroll-driven animations. See this demo: https://codepen.io/noamr-the-selector/pen/jOjPBXP

Basically the element in question has a `view-timeline-name` and an `animation-timeline` referencing itself, with `@keyframes` that animate the `view-transition-name` property. This makes it so that only when the element is in the viewport it has a `view-transition-name`. The offset can be controlled using `view-timeline-inset`.

It's perhaps hacky to use SDA for this but it works today and can be used for other things than view-transitions as well!

-- 
GitHub Notification of comment by noamr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8282#issuecomment-2225917651 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 12 July 2024 16:22:04 UTC