-
Notifications
You must be signed in to change notification settings - Fork 166
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
Missing CSS module renaming for nested @keyframes #450
Comments
Hmm I'm not sure nesting key frames is valid? I think only conditional rules like media, supports, and layer can be nested. |
Yeah I think you may be right. However, if that is true, the keyframe should probably not be renamed. Declaring the keyframe within the CSS module (but not nested) does end up renamed. So all is fine. But if the keyframe is declared outside the CSS module (global), then the declaration is obviously not renamed, but the calling code within the CSS module does rename it. |
Yeah there's currently no way to reference a global identifier like you can use |
Looks like there is already a warning for this - example. I also made a proposal to css modules to enable referencing global identifiers: css-modules/css-modules#390. Going to close this issue since that is tracked elsewhere. |
I have the following CSS which has a nested
@keyframes
:Passing this to lightningcss with nesting and css modules enabled gives me this out ouput:
Which as you can see, renames the
ball
keyframe when it is used, but does not rename the actual declaration.Un-nesting the
@keyframe
results in correctly renaming both the call and the declaration.thx
The text was updated successfully, but these errors were encountered: