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

[v4.0.5] Used css variables are removed from @keyframes #16374

Closed
ramrami opened this issue Feb 8, 2025 · 4 comments · Fixed by #16376
Closed

[v4.0.5] Used css variables are removed from @keyframes #16374

ramrami opened this issue Feb 8, 2025 · 4 comments · Fixed by #16376

Comments

@ramrami
Copy link

ramrami commented Feb 8, 2025

What version of Tailwind CSS are you using?

v4.0.5

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

Gulp + Postcss

What version of Node.js are you using?

v20

What browser are you using?

Brave

What operating system are you using?

macOS

Reproduction URL

https://play.tailwindcss.com/4MlgazRExq?file=css

Describe your issue

Given this setup

@property --angle {
  inherits: true;
  initial-value: 0deg;
  syntax: '<angle>';
}

@theme {
  --animate-rotate-angle: rotate-angle 2s infinite linear;  
  @keyframes rotate-angle {
    to {
      --angle: 360deg;
    }
  }    
}

TW v4.0.5 removes the css var from the keyframe when the animation is used and generate the keyframe like this:

@keyframes rotate-angle {
  to {
  }
}
@adamwathan
Copy link
Member

Thanks for reporting! Just simplified the repro a bit more to make it easier to pin down:

https://play.tailwindcss.com/0vLufKbnNw?file=css

Will get a fix out on Monday at the latest 👍

@ngdangtu-vn
Copy link

It seems that is my problem as well

@philipp-spiess
Copy link
Member

Just FYI that we reverted the change that caused CSS variables to be removed so this issue is resolved right now on the latest release. We still want to ensure this is fixed when we re-land the change so I'm going to keep this open but if you're affected by this right now, please update to 4.0.6.

philipp-spiess added a commit that referenced this issue Feb 21, 2025
Closes #16374

Ensure we don't remove custom properties from within `@keyframe`
declarations.

---------

Co-authored-by: Adam Wathan <[email protected]>
Co-authored-by: Jordan Pittman <[email protected]>
Co-authored-by: Philipp Spiess <[email protected]>
@philipp-spiess
Copy link
Member

Alright this will no longer be an issue when we re-land that PR, thanks gain!

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.

4 participants