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

Don't remove custom transitions #32

Open
quick007 opened this issue Aug 27, 2021 · 5 comments
Open

Don't remove custom transitions #32

quick007 opened this issue Aug 27, 2021 · 5 comments

Comments

@quick007
Copy link

I spent quite a bit trying to make a clean custom light/dark mode button, and the injected night wind transition ruins it. Can we have another css class (like nightwind-transition-prevent) or something?

@jjranalli
Copy link
Owner

Hi – Can you clarify what you mean with "ruins it"? Would disabling all transitions suit your needs, or do you want to disable them only on the button?

Anyway it seems a reasonable addition, will consider adding it in the next release!

@quick007
Copy link
Author

quick007 commented Aug 29, 2021

ruins it

The animation just doesn't play, and the "duration" tag on the animation also makes it take longer on just that component (because its fireing at the same time its switching the mode)

Would disabling all transitions suit your needs, or do you want to disable them only on the button?

Only on the thing with the class nightwind-transition-prevent on it. I believe disabling all transitions is already possible(?)

@vesper8
Copy link

vesper8 commented Sep 4, 2021

Would you mind sharing your clean dark mode toggle button @quick007 : )

@quick007
Copy link
Author

Would you mind sharing your clean dark mode toggle button @quick007 : )

I'm hesitant to call it clean (especially with it being partially broken...) but here ya go: https://github.com/wave-studio/JSBoard/blob/master/components/misc/mode-switcher.tsx

@vesper8

@borispoehland
Copy link

I have the same problem. The "nightwind-prevent" class doesn't stop the transition from happening, overriding my tailwind transition I set on the class

Bildschirmfoto von 2021-09-18 21-51-46

Here's an example. The transition happens despite nightwind-prevent.

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

No branches or pull requests

4 participants