-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add transition-behavior
utilities
#12149
Conversation
src/corePlugins.js
Outdated
'.transition-allow-discrete': { 'transition-behavior': 'allow-discrete' }, | ||
'.transition-behavior-normal': { 'transition-behavior': 'normal' }, | ||
}) | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure on the exact best class names for this?
It would also be good to add a utility for The overlay property shipped in Chrome 117 See https://chromestatus.com/feature/5138724910792704 While transition-behavior allows styling entry animations for popover and dialog for exit animations you need transition-property to include See https://developer.chrome.com/en/blog/new-in-chrome-117/#exit-entry-animations for a good example. |
4498cad
to
8c48e68
Compare
See https://developer.chrome.com/blog/entry-exit-animations/ for a good overview on all these new capabilities in Chrome |
8c48e68
to
d9ec386
Compare
@lukewarlow I've been wanting a CSS property like that for years! 🙌🏼 For a Tailwind CSS implementation, I think we may want to wait until at least all modern browsers implement the feature: ![]() |
WebKit/standards-positions#148 WebKit have a positive standards position on this and look like they have it implemented as well. |
This is part of Interop 2024 so should be in all 3 browsers by the end of the year |
I have no clue what's happened to the branch and why there's so many conflicts and commits but I imagine it's a simple fix |
@lukewarlow Yeah, that's happened to some of mine in the past too. Usually, they just have to rebase it on the latest main/master branch. |
Co-authored-by: Luke Warlow <[email protected]>
d9ec386
to
42266ef
Compare
Hey! You might have noticed that I forced pushed to this branch. The reason is because the PR now uses The code is ported as-is, so no API changes of your feature happened while moving it to the new codebase. I also made sure to add you as a co-author because you still deserve all the credit 💪 |
Congrats, @lukewarlow! |
Looks like this was added to v4 in #15051. |
transition-behavior
is a new CSS property that allows you to transition on discrete properties.This is new in Chrome 117. See https://chromestatus.com/feature/5071230636392448
One major use case for this is styling dialog and popover transitions when showing. (See comment for exit transitions)
See #12040 for a related PR to add a
@starting-style
variant.