Skip to content
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

View transition classes #767

Open
hvanops opened this issue Oct 1, 2024 · 1 comment
Open

View transition classes #767

hvanops opened this issue Oct 1, 2024 · 1 comment
Labels
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

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus-area-proposal Focus Area Proposal
Projects
Status: No status
Development

No branches or pull requests

2 participants