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

Rewriting css keyframes #64

Closed
NeilJS opened this issue Mar 12, 2018 · 1 comment
Closed

Rewriting css keyframes #64

NeilJS opened this issue Mar 12, 2018 · 1 comment
Labels

Comments

@NeilJS
Copy link

NeilJS commented Mar 12, 2018

Hi. I am finding that purgecss is not outputting certain individual css keyframes if they have decimal places in the values - even if the css is actually in use. This is probably a bit of an edge case (I have a css looping feature that fades in/out forever, that uses sass for calculations, hence the decimal places).

A simple example would be:

@keyframes xxx {
  0% {opacity: 0;}
  99.9% {opacity: 1;}
}

is output by purgecss as follows (the 99.9% keyframe is missing):

@keyframes xxx {
  0% {
    opacity: 0; } }

BUT using integers is ok:

@keyframes yyy {
  0% {opacity: 0;}
  99% {opacity: 1;}
}

outputs as expected...

@keyframes yyy {
  0% {
    opacity: 0; }
  99% {
    opacity: 1; } }

I hope there is a way around this. I'm not sure why purgecss is processing these - I'm pretty certain that it's not another module that is doing this (I've spent a while narrowing it down). Any ideas please?

@Ffloriel
Copy link
Member

Thanks for reporting this issue.
It should be fixed with v0.21.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants