-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-view-transitions-2] Define behavior of root element in layered capture #11150
Comments
Not using layered capture for the root makes sense. One interesting case here is what to do if there's a mismatch between capture mode for old and new element. I thought it would be unnecessary to support that pattern and we can require having the same for both. But root->element or element->root would be a common case where that won't be true. For example, see (3) in container transform here. |
I'm actually not sure whether we need to special-case the document element, what does it buy us? In most cases the HTML element anyway doesn't have box decorations. One thing we do need to address is the background color as it has special handling (default background? body background?).
I wonder if we need to handle mismatches at all, or just let them be - treat it as if the side of the mismatch that was flat had no box-decorations and tree effects and everything was content, similar to splitting it to two elements (container/content). |
Theoretically a mismatch shouldn't be an issue with interpolatable properties. If there's a mismatch you get an animation from But likely no. The difference with positioning shows up as which reference box the image-pair is aligned with, which is irrelevant if all the styles are unset in flat mode. So we'll need to be explicit about the way we set up the CSS if only one side has opted-in. Otherwise sounds like it should work. And actually root -> root or root <-> element type of transitions do want root to be layered to animate the background. So makes sense to support it. |
With layered capture mode, it rarely makes sense to capture the root (document element) as style, and it's also not feasible to add a container to achieve the flat capture mode.
Suggesting that the root element is always captured as content (in flat mode).
See also #11078
The text was updated successfully, but these errors were encountered: