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

I want to present a counter-argument to where this is going.
The new prop is a simple condition: "if the element is 100% outside of viewport during capture don't capture it".

This feels like it would work great as an optimization for the cases where the element is out of the viewport throughout the whole transition, and for art-direction when we want to avoid *very far* fly-ins. Perhaps that's sufficient and we may come to that conclusion! But a lot of cases may fall in between... e.g. avoiding a fly-in that is "quite far" but the element still intersects the viewport by a single pixel, or wanting to *change* the animation when an element flys in rather than not capture it at all.

It could be that a customizable margin property in addition would fix that, but something about the condition feels rigid, like a very specific solution to a particular problem that perhaps doesn't extend well to adjacent problems?

This is not an opposition to the proposed direction, but rather a call-out to check if this rigid condition we're proposing aligns well enough with real world use cases in such a way that would be useful enough to replace `IntserctionObserver`-based solutions in those cases.

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


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

Received on Tuesday, 11 June 2024 15:10:31 UTC