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

Animation keyframe name is not always transformed to local scope name #83

Open
ghost opened this issue Jul 27, 2018 · 5 comments
Open

Comments

@ghost
Copy link

ghost commented Jul 27, 2018

Actual:
The following input,

@keyframes slideIn {
  0% {
    margin-left: 100%;
  }
  100% {
    margin-left: 0%;
  }
}

.case-1 {
  animation: 2s slideIn;
}

.case-2 {
  animation: slideIn 2s;
}

when using the command,
postcss input.css -u postcss-modules -o output.css

generates the following output

@keyframes _slideIn_1329k_1 {
  0% {
    margin-left: 100%;
  }
  100% {
    margin-left: 0%;
  }
}

._case-1_1329k_19 {
  animation: 2s :local(slideIn);
}

._case-2_1329k_27 {
  animation: _slideIn_1329k_1 2s;
}

Expected
I would expect the keyframe name to be transformed in both cases.

@madyankin
Copy link
Owner

@ben-mckernan sorry, I haven't enough time now :(. If you'll be able to tackle this, PR is welcome!

@SuperOleg39
Copy link

Have same bug, looks like problem inside post-css-modules-scope

@madyankin
Copy link
Owner

Subscribed to the linked PR, will update the deps when it's merged

@mischnic
Copy link

The linked PR is merged, any chance this package can be updated?

@madyankin
Copy link
Owner

@mischnic will be able to check on the weekend, thanks for pinging me

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

No branches or pull requests

3 participants