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

Keyframes from used animations with multiple keyframes are removed #166

Closed
ThisNameWasTaken opened this issue Jan 21, 2019 · 0 comments
Closed

Comments

@ThisNameWasTaken
Copy link
Contributor

Describe the bug
Let's say we have the fallowing files:
styles.css

.scale-spin {
    animation: spin 300ms linear infinite forwards,scale 300ms linear infinite alternate;
}
@keyframes spin { /* ... */ }
@keyframes scale  { /* ... */ }

index.html

<div class="scale-spin"></div>

purgecss config

new Purgecss({
    content: ['index.html'],
    css: ['styles.css'],
    keyframes: true // discard unused keyframes
})

As of right now, if you run purgecss on these two, the scale keyframe will be removed and only the spin would be kept.

Expected behavior
Both the scale and spin keyframes are kept.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version of Purgecss: 1.1.0

I will make a pull request to fix this issue.

ThisNameWasTaken added a commit to ThisNameWasTaken/purgecss that referenced this issue Jan 21, 2019
ThisNameWasTaken added a commit to ThisNameWasTaken/purgecss that referenced this issue Jan 21, 2019
Ffloriel added a commit that referenced this issue Feb 18, 2019
@Ffloriel Ffloriel closed this as completed Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants