Skip to content

View transition classes #767

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

Closed
hvanops opened this issue Oct 1, 2024 · 2 comments
Closed

View transition classes #767

hvanops opened this issue Oct 1, 2024 · 2 comments
Labels
accepted An accepted proposal focus-area-proposal Focus Area Proposal

Comments

@hvanops
Copy link

hvanops commented Oct 1, 2024

Description

This feature introduces a new CSS property view-transition-class which allows the developer to specify one or more view transition classes. The developer can then select the ViewTransition pseudo elements using these classes (e.g. ::view-transition-group(*.class)).

This is an extension to the ViewTransition API that simplifies styling of view transition pseudo elements in a similar way that CSS classes simplify styling of regular DOM elements.

Specification

https://drafts.csswg.org/css-view-transitions-2/#view-transition-class-prop

Additional Signals

Standards Positions
Gecko No information - mozilla/standards-positions#988
WebKit Positive and shipping in STP - WebKit/standards-positions#321

Tests
https://wpt.fyi/results/css/css-view-transitions/parsing?label=experimental&label=master&aligned
https://wpt.fyi/results/css/css-view-transitions (pseudo-with-classes-*)

Browser Bugs
Chromium

Additional Signals
This was originally discussed in w3c/csswg-drafts#8319. A few developers outside of Google showed interest.
Use cases:
List to details view [link] - developers are using JS to achieve this today, but it’s not easy

@hvanops hvanops added the focus-area-proposal Focus Area Proposal label Oct 1, 2024
@captainbrosset
Copy link
Contributor

In preliminary results to the State of CSS 2024 survey, View Transitions came up as the 5th most common answer to the question "Are there any existing CSS features that you have difficulties using (or avoid altogether) because of lack of support, or differences between browsers?".

(can't share a link yet as these are preliminary results)

@wpt-interop
Copy link
Collaborator

Thank you for proposing View transition classes for inclusion in Interop 2025.

We are pleased to let you know that this proposal was accepted as part of the View Transitions focus area. You can follow the progress of this focus area on the Interop 2025 dashboard.

For an overview of our process, see proposal selection. Thank you for contributing to Interop 2025!

Posted on behalf of the Interop team.

@foolip foolip added the accepted An accepted proposal label Feb 17, 2025
@foolip foolip closed this as completed Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted An accepted proposal focus-area-proposal Focus Area Proposal
Projects
Status: Done
Development

No branches or pull requests

4 participants