Skip to content

Add view-transition-class property#37901

Merged
bsmth merged 19 commits intomdn:mainfrom
cssinate:add-view-transition-class
May 27, 2025
Merged

Add view-transition-class property#37901
bsmth merged 19 commits intomdn:mainfrom
cssinate:add-view-transition-class

Conversation

@cssinate
Copy link
Contributor

@cssinate cssinate commented Jan 31, 2025

Description

Adding a page for the view-transition-class property.

Motivation

This property is supported in Chrome and Edge, but not documented in MDN yet.

Additional details

image

Fix #37231

@cssinate cssinate requested review from a team as code owners January 31, 2025 16:22
@cssinate cssinate requested review from estelle and sideshowbarker and removed request for a team January 31, 2025 16:22
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Jan 31, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jan 31, 2025

Preview URLs (9 pages)
Flaws (3)

Note! 6 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/View_Transition_API
Title: View Transition API
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/API/View_Transitions_API/Using which is a redirect

URL: /en-US/docs/Web/API/View_Transition_API/Using
Title: Using the View Transition API
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/API/View_Transitions_API/Using which is a redirect

URL: /en-US/docs/Web/CSS/CSS_view_transitions
Title: CSS view transitions
Flaw count: 1

  • macros:
    • Can't resolve /en-US/docs/Web/API/CSSViewTransitionRule
External URLs (3)

URL: /en-US/docs/Web/API/View_Transition_API/Using
Title: Using the View Transition API


URL: /en-US/docs/Web/CSS/view-transition-class
Title: view-transition-class

(comment last updated: 2025-02-28 22:05:25)

@sideshowbarker sideshowbarker removed their request for review February 1, 2025 13:26
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I added a few comments

@cssinate cssinate force-pushed the add-view-transition-class branch 2 times, most recently from 95f79e5 to b91b186 Compare February 7, 2025 19:22
@cssinate
Copy link
Contributor Author

cssinate commented Feb 7, 2025

@estelle Thanks! I think I've fixed everything. Do you know what's happening with the Formal Definition and why it's not found? Is there something I can do to fix this?

@cssinate cssinate requested a review from estelle February 7, 2025 19:27
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

thanks. I made some suggestions to the vt-group page to apply to the other pages.

The specificity info is at https://drafts.csswg.org/css-view-transitions-2/#pseudo-element-class-additions

@Josh-Cena
Copy link
Member

Hi @cssinate Do you plan to come back to this?

As for the formal definition, they are hosted in a separate data repo, so you don't have to worry about them, though you are definitely welcome to contribute to https://github.com/mdn/data

@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot removed the merge conflicts 🚧 [PR only] label Mar 10, 2025
@bsmth bsmth added the awaiting response Awaiting for author to address review/feedback label Apr 11, 2025
@bsmth
Copy link
Member

bsmth commented Apr 11, 2025

It looks like this PR is at risk of going stale, does anyone wish to pick up where the author left off? @cssinate do you want to come back to this or should someone (@estelle probably?) else help get this over the line? Thank you :)

@cssinate
Copy link
Contributor Author

My apologies. I didn't have the bandwidth last month to keep on this, but I'll handle this within the next few work days.

@cssinate cssinate force-pushed the add-view-transition-class branch from e307b01 to 4620e42 Compare April 11, 2025 16:27
@cssinate cssinate requested a review from a team as a code owner April 11, 2025 16:27
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

partial review. still need to review the new page (transition class)

@Josh-Cena Josh-Cena removed the awaiting response Awaiting for author to address review/feedback label Apr 24, 2025
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

reviewed the guide

Comment on lines +51 to +65
```css
::view-transition-group(.card) {
animation-duration: 3s;
}

.card {
view-transition-class: card;
}

.card#card1 {
view-transition-name: card1;
}

.card#card2 {
view-transition-name: card2;
Copy link
Member

Choose a reason for hiding this comment

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

This example likely works, but the reader will not know if the .card in the vtg parameter is the class of the element or the value of the vtc with a period in front of it. I suggest using two different class namet to make this clear.

Copy link
Member

Choose a reason for hiding this comment

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

Tried to improve in f850a86 if you can have a look

@estelle
Copy link
Member

estelle commented May 20, 2025

Hi @cssinate. Please submit a re-review request by clicking on the icon next to my name in the reviewers list when you've had a chance to review the comments. thanks.

@bsmth
Copy link
Member

bsmth commented May 21, 2025

Hi @cssinate. Please submit a re-review request by clicking on the icon next to my name in the reviewers list when you've had a chance to review the comments. thanks.

@estelle would you like to commit your suggestions to the branch already so we can merge the improvements? There's another PR in-flight (linked by Josh above) on the same topic for Fx release docs, so it would be good to avoid conflicts on it.

Any objections to that @cssinate?

Thanks!

@cssinate
Copy link
Contributor Author

Yeah, I'm sorry this has been low-priority for me. I had more free time when I submitted the initial PR than I've had since then. If anyone has time to merge the suggestions (doesn't have to be Estelle) that would be awesome please and thank you.

@bsmth bsmth requested a review from estelle May 23, 2025 09:16
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
bsmth and others added 2 commits May 23, 2025 11:21
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@bsmth bsmth self-assigned this May 23, 2025
@bsmth
Copy link
Member

bsmth commented May 23, 2025

Yeah, I'm sorry this has been low-priority for me. I had more free time when I submitted the initial PR than I've had since then. If anyone has time to merge the suggestions (doesn't have to be Estelle) that would be awesome please and thank you.

Thanks a lot. I've assigned myself to help get this over the finish line! Well done on all of your work, some small adjustments left as far as I can see, but hopefully we can merge soon.

Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

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

+1 from me! Thank you! @estelle can you have a quick look?

@cssinate
Copy link
Contributor Author

cssinate commented May 26, 2025 via email

@bsmth
Copy link
Member

bsmth commented May 27, 2025

Thanks, all! Going to merge shortly

@bsmth bsmth merged commit 5de3378 into mdn:main May 27, 2025
8 checks passed
zachernuk pushed a commit to zachernuk/content that referenced this pull request Jun 4, 2025
* Add view-transition-class property

* Address comments from @estelle

* Fixing awkward wording

* Add backticks to period

* Remove KeyboardEvent.initKeyEvent page (mdn#39027)

* Adding suggested changes

* fix linting issues

* Apply suggestions from code review

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>

* Apply suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(css): Use parens for view transition pseudo names

* Update files/en-us/web/api/view_transition_api/index.md

* chore(css): ad param section

* chore(css): try to make the view transition names more illustrative

* Update files/en-us/web/css/view-transition-class/index.md

---------

Co-authored-by: Paul Grant <paul.grant@hootsuite.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Estelle Weyl <estelle@weyl.org>
Co-authored-by: Brian Smith <brian@smith.berlin>
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

view-transition-class is well-implemented

6 participants