-
Notifications
You must be signed in to change notification settings - Fork 711
[css-view-transitions-1] Is "named elements" map in the right order after "capture new state" algorithm? #9672
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
Comments
(This is of course an edge case, but it would be good to clarify still) |
The spec says here that the iteration on elements should be according to paint order. |
That doesn't really answer my question. I'm talking about step 4.6 of "capture new state":
If I'm aware that case is a super edge case, because most of the map will be populated by "capture old state", in the right order, but where the step 4.6. of "capture new state" appends in the map makes a difference visually. |
Oops, missed this, sorry.
Yea, this would be an entry animation, which might be more than an edge case. |
Yeah, there's a non-normative note that says that we're ensuring the named elements map has the same order as the paint order. This implies that the new elements that don't exist in the old state are painted as if they had higher paint order (ie paint on top). This is intentional. I can't find the issue where we discussed this, so it may have been discussed in the PR as part of the initial draft, but here's a summary comment from Khushal: #8941 (comment) Essentially, we have to pick some order, and the one we have is as good as any, and not too complicated. |
I'm OK with how the current spec is written (it's actually easier to implement), but I think it would be good to add a note in "Capture new state" as well that this is an intentional choice. |
In "capture new state", there is this step:
However, it doesn't mention where to insert the element, which means by default we would be adding it at the end of the ordered map. It is the more convenient default to implement, but is this correct? You might expect to want to preserve the paint order or such (slightly more of a pain to do, but possible)
cc @noamr @khushalsagar @fantasai @tabatkins @vmpstr
The text was updated successfully, but these errors were encountered: