nightwind icon indicating copy to clipboard operation
nightwind copied to clipboard

Don't remove custom transitions

Open quick007 opened this issue 3 years ago • 5 comments

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?

quick007 avatar Aug 27 '21 23:08 quick007

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!

jjranalli avatar Aug 28 '21 10:08 jjranalli

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(?)

quick007 avatar Aug 29 '21 19:08 quick007

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

vesper8 avatar Sep 04 '21 11:09 vesper8

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

quick007 avatar Sep 13 '21 16:09 quick007

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.

borispoehland avatar Sep 18 '21 19:09 borispoehland