How to upgrade rotate-
in tailwindcss v4?
#16446
-
the see https://play.tailwindcss.com/F637QTFwch, and hover the box ![]() but in v4 it be transformed into if there is an animation that uses transform rotate, there is a problem here. see https://play.tailwindcss.com/x7W58yQxAP, and hover the box ![]() |
Beta Was this translation helpful? Give feedback.
Answered by
Inventoris
Feb 12, 2025
Replies: 1 comment 1 reply
-
Hi @Debbl. I don't see a problem, the animation from both examples works for me. But to be more correct, you need to animate not transform, but rotate like this: @import "tailwindcss";
@theme {
--animate-rotate-hover: animate-rotate 3s linear infinite;
@keyframes animate-rotate {
0%,
100% {
rotate: -30deg;
}
50% {
rotate: 30deg;
}
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Debbl
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @Debbl.
I don't see a problem, the animation from both examples works for me.
But to be more correct, you need to animate not transform, but rotate like this: