You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when an element is snapshotted for a ViewTransition its captured in its entirety (modulo implementation constraints), see here.
But for the root the snapshot is clipped to viewport, see here.
The reason for this divergence is:
The root is likely to be large in a lot of cases and rendering it completely is wasteful of memory/compute.
A partially onscreen element may be brought more onscreen during the transition animations so all its content is conservatively painted.
Its unclear if the tradeoff above makes sense in all cases, maybe the author should decide this based on the transition animations they will be creating? @jakearchibald has brought up cases where the root is slightly scrolled during the transition (from a header which animates away) and needs a small margin of offscreen content to be painted.
This intersects with #8282 but I'm filing it separately so the use-case is not lost. Since #8282 could be limited to which elements participate in a transition while this is about how much content of an element is painted.
The text was updated successfully, but these errors were encountered:
Currently when an element is snapshotted for a ViewTransition its captured in its entirety (modulo implementation constraints), see here.
But for the root the snapshot is clipped to viewport, see here.
The reason for this divergence is:
Its unclear if the tradeoff above makes sense in all cases, maybe the author should decide this based on the transition animations they will be creating? @jakearchibald has brought up cases where the root is slightly scrolled during the transition (from a header which animates away) and needs a small margin of offscreen content to be painted.
This intersects with #8282 but I'm filing it separately so the use-case is not lost. Since #8282 could be limited to which elements participate in a transition while this is about how much content of an element is painted.
The text was updated successfully, but these errors were encountered: