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

group-*:animate-* generates invalid keyframe definition #4705

Closed
jnugh opened this issue Jun 18, 2021 · 8 comments · Fixed by #5223
Closed

group-*:animate-* generates invalid keyframe definition #4705

jnugh opened this issue Jun 18, 2021 · 8 comments · Fixed by #5223

Comments

@jnugh
Copy link

jnugh commented Jun 18, 2021

What version of Tailwind CSS are you using?

v2.2.0

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

[email protected], [email protected]

What version of Node.js are you using?

v15.10.0

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction repository

https://play.tailwindcss.com/DrsR2rdrZO

Describe your issue

Adding an animation that should only be applied to group children (e.g. group-focus group-hover) generates invalid keyframes (offsets are missing):

@keyframes bounce {

	, {
		-webkit-transform: translateY(-25%);
		        transform: translateY(-25%);
		-webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);
		        animation-timing-function: cubic-bezier(0.8,0,1,1);
	}

	 {
		-webkit-transform: none;
		        transform: none;
		-webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);
		        animation-timing-function: cubic-bezier(0,0,0.2,1);
	}
}
.group:focus .group-focus\:animate-bounce {
	-webkit-animation: bounce 1s infinite;
	        animation: bounce 1s infinite;
}

expected (taken from non-group animate-* classes):

@keyframes bounce {

	0%, 100% {
		-webkit-transform: translateY(-25%);
		        transform: translateY(-25%);
		-webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);
		        animation-timing-function: cubic-bezier(0.8,0,1,1);
	}

	50% {
		-webkit-transform: none;
		        transform: none;
		-webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);
		        animation-timing-function: cubic-bezier(0,0,0.2,1);
	}
}
.animate-bounce {
	-webkit-animation: bounce 1s infinite;
	        animation: bounce 1s infinite;
}
@grumpyTofu
Copy link

Found this in my search, I hope it helps:
https://github.com/tailwindlabs/play.tailwindcss.com/issues/54

If you downgrade to 2.1.4 it should work again.

@jnugh
Copy link
Author

jnugh commented Jun 28, 2021

Yeah it worked before, so definitely a regression.
I stepped trough the code a little and it looks like the { respectVariants: false } config gets lost somewhere and is not set in

function applyVariant(variant, matches, context) {
so the value gets handled as if it was a css selector.

@Timber1900
Copy link

Also experiencing the same issue, and since downgrading currently isn't an option for me I'd like to see this fixed.

@infothien
Copy link

My team is currently running into this issue as well. Looking forward to the fix in the next version

@juanzgc
Copy link

juanzgc commented Jul 12, 2021

Also running into this issue, currently downgraded to version 2.1.4

@FallDownTheSystem
Copy link

Same problem for me.

1 similar comment
@Sanbolee
Copy link

Same problem for me.

@adamwathan
Copy link
Member

Should be fixed on master, will try to tag an insiders build to tide everyone over until the next release when I'm at my computer.

Currently here, my apologies 🙈

image

No those aren't Crocs... they are Walmart knock-off Crocs.

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.

8 participants