Skip to content

[css-view-transitions-1] Can't we just remove transition root pseudo-element and show view transition tree from the spec? They seem unnecessary. #12760

@Psychpsyo

Description

@Psychpsyo

View Transitions 1 says that a view transition has a

transition root pseudo-element
a ::view-transition. Initially a new ::view-transition.

This implies that a new ::view-transition gets created for every view transition and they all originate from the document element, all the time.
So then document gets extended with

show view transition tree
A boolean. Initially false.
When this is true, this’s active view transition’s transition root pseudo-element renders as a child of this’s document element, with this’s document element is its originating element.

so that it can control which of these gets rendered and when. (Note: it's only ever one and its contents stop being useful once it stops being rendered)

Would it not be simpler to just fill ::view-transition with content in Setup transition pseudo-elements (like right now), and then remove all that content in Clear view transition? (instead of setting show view transition tree to false) Rendering an empty ::view-transition does nothing, any references to the transition root pseudo-element can just talk about the ::view-transition on the document element instead and, from what I can tell, no other spec ever tries to read from show view transition tree so it's now unnecessary.

TLDR: ::view-transition is already defined, which implies it to exist anyways and there is currently only ever one of them being rendered so I don't see why show view transition tree and transition root pseudo-element need to exist. They seem to be doing a bunch of paperwork and allocations and defining of stuff for no reason.

I ask because I am implementing this in Ladybird and just not implementing these concepts seems like the most straight-forward way to do that. (and I feel like I must be missing something)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions