Skip to content

Conversation

@vmpstr
Copy link
Member

@vmpstr vmpstr commented Oct 17, 2025

[css-view-transitions-2] Specify view-transition-nane: match-element

Issue #10995

@vmpstr vmpstr requested review from bramus and noamr October 17, 2025 16:44
@noamr
Copy link
Collaborator

noamr commented Oct 17, 2025

I am pretty sure I did this already in #11393

Was it omitted when merging L1 and L2?

@bramus
Copy link
Contributor

bramus commented Oct 17, 2025

Was it omitted when merging L1 and L2?

Sure looks like it. Because there are partial mentions of match-element in the current drafts (namely that match-element is not accepted as one of the custom-idents)

@bramus
Copy link
Contributor

bramus commented Oct 20, 2025

I dug in a bit more and I figured out: there is a section on auto naming with auto/match-element in the spec, but the problem is that the definition of the view-transition-name prop does not mention these keywords are possible values.

	<pre class=propdef>
	Name: view-transition-name
	Value: none | <<custom-ident>>
	Initial: none
	Inherited: no
	Percentages: n/a
	Computed Value: as specified
	Animation type: discrete
	</pre>

So my first suggestion would be to extend list of values for view-transition-name as follows:

- 	Value: none | <<custom-ident>>
+ 	Value: none | match-element | auto | <<custom-ident>>

Both terms could then use a (simple) description but one without an example, as the description can link to the section on auto naming for examples.

I’d also recommend to use “element identity” in the descriptions, as that’s the terminology we’ve used in the discussions and one that make it clear.

In https://developer.chrome.com/blog/view-transitions-in-2025#auto-name_elements_with_view-transition-name_match-element I also included the following note, which could make a good note in the spec as well:

Note: Elements in different documents have a different identity, therefore match-element can only be used in same-document view transitions.

Copy link
Contributor

@bramus bramus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(see previous comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants