nightwind
nightwind copied to clipboard
Don't remove custom transitions
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?
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!
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(?)
Would you mind sharing your clean dark mode toggle button @quick007 : )
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
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
Here's an example. The transition happens despite nightwind-prevent.