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
{{ message }}
Repository navigation
[css-view-transitions-1] Handling snapshot viewport sizes changes during transitions #8045
A resize creates situations the developer may not have predicted and catered for. For example, they may have assumed that their site header would be the same size in the old and new states. A resize can break that assumption.
Given that the transition is an enhancement, and the user is performing an 'interrupting' action by resizing the window, skipping the transition seems reasonable.
Update the animation state and continue
All 'new' elements will be updated with their new size, which in turn will update all animations in progress. This includes the transition container representing the root element - this will be the only case where this element animates width & height.
Your point here: "they may have assumed that their site header would be the same size in the old and new states" is particularly true for changes in screen orientation. I doubt there is a good way to do a more involved transition there other than a cross-fade.
So not worth the complexity IMO. We can collect metrics to see how often we get these resizes midway through a transition and do something better if its worthwhile.
Since this is merely limiting the scope of the first iteration of this feature we likely do not need to spend meeting time on it.
The CSSWG will automatically accept this resolution one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support this resolution, please add a new comment.
Proposed Resolution: For the current module level, abort view transitions if the snapshot viewport changes size. We can take this up in future levels as use cases and solutions permit.
RESOLVED: For the current module level, abort view transitions if the snapshot viewport changes size. We can take this up in future levels as use cases and solutions permit.
Activity
khushalsagar commentedon Nov 8, 2022
My vote is for skipping the transition:
Your point here: "they may have assumed that their site header would be the same size in the old and new states" is particularly true for changes in screen orientation. I doubt there is a good way to do a more involved transition there other than a cross-fade.
To do this properly we'll also need animation retargeting from [css-shared-element-transitions-1] should animations retarget to new positions smoothly #7813 which is not trivial.
So not worth the complexity IMO. We can collect metrics to see how often we get these resizes midway through a transition and do something better if its worthwhile.
astearns commentedon Dec 15, 2022
Since this is merely limiting the scope of the first iteration of this feature we likely do not need to spend meeting time on it.
The CSSWG will automatically accept this resolution one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support this resolution, please add a new comment.
Proposed Resolution: For the current module level, abort view transitions if the snapshot viewport changes size. We can take this up in future levels as use cases and solutions permit.
astearns commentedon Dec 23, 2022
RESOLVED: For the current module level, abort view transitions if the snapshot viewport changes size. We can take this up in future levels as use cases and solutions permit.
Skip transition if viewport changes. Fixes w3c#8045