-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
turbopack breaks animation with css variables #75526
Comments
@yyjhao Thank you for submitting another CSS issue! I think the syntax may have to be slightly different since we're using LightningCSS → https://lightningcss.dev/css-modules.html#local-css-variables. But it's not working when trying to reference a css variable from the other file/global, so curious if we're not on the latest LightningCSS. Edit: we're on the latest crate, so not sure exactly why it's not working with that syntax 🤔 |
I don't think the syntax is the issue here because it's using local variables. It may be a bug in lightning css? here's the generated css:
looks like move2 isn't correctly replaced |
Hmm maybe it's a next.js bug after all? here's my quick test with Lightning CSS:
this outputs
which looks right |
@yyjhao Thanks for taking a look! Yeah not completely sure yet where the root of the issue is. Will be flagging to the team! |
@yyjhao Just came to look at this again. A workaround currently is to separate the
|
I'm not sure why does playground works, but I could confirm that the parser of lightningcss is not parsing the input correctly. Debug dump of Rust struct
|
I filed parcel-bundler/lightningcss#935 |
### What? Call `minify()` of `StyleSheet`. ### Why? We should call it regardless, as it's actually `transform()` with a bad name. See parcel-bundler/lightningcss#935 (comment) ### How - Closes #75526
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/hy2fx4?file=%2Fapp%2Fpage.module.css
To Reproduce
load the page
observe that the red box is animating but the blue box is not
removing --turbopack fixes the issue
Current vs. Expected behavior
both boxes should animate
Provide environment information
Which area(s) are affected? (Select all that apply)
CSS, Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: