feat: add match-element as an explicit ViewTransitionName variant#1274
Open
PranavAchar01 wants to merge 1 commit into
Open
feat: add match-element as an explicit ViewTransitionName variant#1274PranavAchar01 wants to merge 1 commit into
match-element as an explicit ViewTransitionName variant#1274PranavAchar01 wants to merge 1 commit into
Conversation
`match-element` is a new keyword in the CSS View Transitions Level 2 spec that derives an element's view-transition-name from its identity. Without this variant it fell through to `Custom(CustomIdent)` and was erroneously renamed when CSS Modules scoping was enabled. Fixes parcel-bundler#1256. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1256.
match-elementis a new keyword in the CSS View Transitions Level 2 spec that sets an element'sview-transition-nameto a value derived from its identity (rather than an author-chosen name).Before this change the keyword had no explicit enum variant and fell through to
Custom(CustomIdent). This caused two problems:match-elementas if it were an author identifier.Fix: add a
MatchElementvariant betweenAutoandCustominViewTransitionName. The#[derive(Parse, ToCss)]macros already handle the kebab-case round-trip automatically.Test plan
cargo testpasses (119/119 lib tests)match-elementis preserved verbatim and not renamed🤖 Generated with Claude Code