-
-
Notifications
You must be signed in to change notification settings - Fork 603
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
Using imported globally scoped keyframes inside local scope #399
Comments
can you give more detail on this one? Are you using css-modules? have you tried something like |
@timse specifying
|
@kumarharsh Does just using the the global name not work ? (Exclude the e.g |
@michael-ciniawsky I've not tried global names, but local keyframe names are not being exported, which led me to investigate other variants, but I couldn't get it working at all. I have a file called animations.css, which has this:
First, I tried to /* Input.css */
@value moving-stripes from "../../animations.css";
.container:global(.is-focused) {
composes: moving-stripes;
} but since my class is composite ( Then, I'm tried to import this /* Input.css */
@value bg-move from "../../animations.css";
.container:global(.is-focused) {
animation: bg-move 1.5s infinite linear;
} which doesn't work - Then I tried turning In the end, I just gave up and duplicated the keyframe definitions. |
Look #243 (comment), also duplicate #243 |
For reference, I found this issue while debugging and documented several approaches here: https://gravitydept.com/blog/keyframe-animations-in-css-modules |
Is there any way to use globally scoped keyframes that are imported with
@import
inside of locally scoped CSS? Here's what I'm trying to do:Input
Output
What I want is for my animation to use the globally-scoped
flipInX
, notsrc-styles-___index__flipInX___1rs16
. It seems that css-loader assumes that any keyframes reference must also be locally scoped if the selector that contains the reference is also locally scoped.The text was updated successfully, but these errors were encountered: