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

Custom animations with more than 1 animation separeted by commas dont work #5015

Closed
Timber1900 opened this issue Jul 19, 2021 · 15 comments · Fixed by #5252
Closed

Custom animations with more than 1 animation separeted by commas dont work #5015

Timber1900 opened this issue Jul 19, 2021 · 15 comments · Fixed by #5252

Comments

@Timber1900
Copy link

Timber1900 commented Jul 19, 2021

What version of Tailwind CSS are you using?

v2.2.4

What build tool (or framework if it abstracts the build tool) are you using?

Next.js 11.0.1

What version of Node.js are you using?

v16.4.2

What browser are you using?

Chrome

What operating system are you using?

Windows

Reproduction repository

https://play.tailwindcss.com/si3enE3TvA

Describe your issue

On tailwind.config.js

theme: {
  extend: {
    animation: {
      issue: 'animation1, animation2',
    }
  }
}

adding multiple animations makes the keyframes disappear from the styled component which makes the animation not work

@Timber1900
Copy link
Author

Relevant codepen with expected result
https://codepen.io/timber1900/pen/rNmwEvq?editors=1100

@mohitsinghs
Copy link

@Timber1900 Sounds like same problem as mine #4711. Combined animations are not being processed ( intentionally ? ) due to which keyframes are ignored. I tried #4802 but closed due to inaction. Defining animation along with keyframes in CSS should work for now.

@Timber1900
Copy link
Author

I had a mistake in my reproduction repository and while I could have sworn it wasn't working when I created the issue as I was testing in another Tailwind Play it appears to now be working https://play.tailwindcss.com/5t0tNwzics

I'll be closing this issue as the problem appears to have fixed itself.

@Timber1900
Copy link
Author

I'm reopening this issue because I found managed to reproduce the issue,

Therefore the issue is with tailwind not including the keyframes in the compiled css when the only animation using said keyframes includes multiple animations

@Timber1900 Timber1900 reopened this Jul 21, 2021
@icidasset
Copy link

I'm seeing this issue too, keyframes are ignored when a , is used in the animation. Temporary workaround is to create animation-1 and animation-2 for keyframes-1 and keyframes-2 respectively (as opposed to animation: keyframes-1, keyframes-2), and then add those animation classes to the safelist.

@mohitsinghs
Copy link

mohitsinghs commented Aug 10, 2021

@icidasset your workaround does help including keyframes but combined animations still does not work. Since animate- classes override each other, applying two classes causes last one to work unless we create and use a third class combining animations while keeping previous two.

@Alwinator
Copy link

Thanks for implementing @bradlc.

@adamwathan
Copy link
Member

Will be fixed in the next patch release, hopefully Monday or Tuesday 👍 Thank you!

@juanilarregui
Copy link

juanilarregui commented Sep 24, 2021

I'm still having the same problem. My version is 2.2.15, mode: 'jit' in my tailwind.config.js.

@zzAIMoo
Copy link

zzAIMoo commented Nov 26, 2021

Having the same problem here, Version 2.2.19 with jit mode selected

@Rock070
Copy link

Rock070 commented Jan 10, 2022

Having the same problem here, 2022-01-10

@Bryuhn
Copy link

Bryuhn commented Nov 25, 2022

Im also still having this problem, 2022-11-25

@mverissimo
Copy link

This looks still happen, especially using CSS modules:

https://codesandbox.io/p/sandbox/css-modules-vczjci

Is it valid to reopen this issue, to investigate? @adamwathan

@xxKeefer
Copy link

i am having this issue, 21-03-23

@eggsforbacon
Copy link

This is in fact still happening as of august 2023

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 a pull request may close this issue.