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] Vite plugin breaks svelte global animation keyframes handling #14965

Closed
emmbm opened this issue Nov 11, 2024 · 2 comments · Fixed by #14981
Closed

[v4] Vite plugin breaks svelte global animation keyframes handling #14965

emmbm opened this issue Nov 11, 2024 · 2 comments · Fixed by #14981
Assignees

Comments

@emmbm
Copy link

emmbm commented Nov 11, 2024

What version of Tailwind CSS are you using?

v4.0.0-alpha.32

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

Vite with SvelteKit 2.8.0 (latest)

What version of Node.js are you using?

For example: v23.1.0

What browser are you using?

Chrome

What operating system are you using?

MacOS

Reproduction URL

https://github.com/emmbm/tailwind-svelte-keyframes

Describe your issue

Updating from @tailwindcss/vite@4.0.0-alpha.31 to @tailwindcss/vite@4.0.0-alpha.32 breaks svelte's expected handling (read here renaming) of global keyframes defined in style blocks.

In svelte components, styles are scoped by default. This scoping also applies to keyframes, unless they are defined with a -global- prefix which svelte then removes during build. This behavior is broken in the current next version of tailwind.

@philipp-spiess philipp-spiess self-assigned this Nov 11, 2024
@philipp-spiess
Copy link
Member

Yeah it does seem that the default Svelte transforms now no longer apply at all. Looking into it, thanks for the report.

@philipp-spiess
Copy link
Member

@emmbm The next alpha will have a fix for this! Thanks again for the report 🙇

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.

2 participants