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

Add class for opting out of disableTransitionOnChange #257

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dominikjasek
Copy link

Changes

This PR adds option to opt-out from behaviour defined by property disableTransitionOnChange. You can add class enable-transition-on-change to any element and it will not disable transition during theme switch.

Motivation:

I have this easter egg on my CV and transition of thug life elements doesn't work when switching themes.

Current behaviour:

thug-before.mp4

Behaviour with this PR:

thug-after.mp4

Copy link

vercel bot commented Feb 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-themes-basic ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2024 10:40am
next-themes-tailwind ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2024 10:40am
next-themes-with-app-dir ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2024 10:40am

@pacocoursey
Copy link
Owner

I see it and I get the idea, but I think generally I'll remove the disableTransitionOnChange prop in favor of people using view transitions here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants