Skip to content

How to upgrade rotate- in tailwindcss v4? #16446

Answered by Inventoris
Debbl asked this question in Help
Discussion options

You must be logged in to vote

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;
    }
  }
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Debbl
Comment options

Answer selected by Debbl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants