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

Bug: Keyframe optimization blocks 0% keyframe, prevents animation from running #80

Closed
restlessdesign opened this issue Sep 13, 2012 · 4 comments

Comments

@restlessdesign
Copy link

Discovered this while using the Animate.css library. Only using the -webkit- prefix to keep this example short:

@-webkit-keyframes rotateInUpRight {
  0% {
    -webkit-transform-origin: right bottom;
    -webkit-transform: rotate(-90deg);
    opacity: 0;
  }

  100% {
    -webkit-transform-origin: right bottom;
    -webkit-transform: rotate(0);
    opacity: 1;
  }
}

Gives the following output (expanded for readability):

@-webkit-keyframes rotateInUpRight{
    0% {
        -webkit-transform:rotate(-90deg);
        opacity:0
    }

    0%,100% {
        -webkit-transform-origin:right bottom;
    }

    100%{
        -webkit-transform:rotate(0);
        opacity:1
    }
}

The issue is caused by the 0%,100% keyframe appearing after the 0% keyframe declaration. Altered, this code will animate as expected:

@-webkit-keyframes rotateInUpRight{
    0%,100% {
        -webkit-transform-origin:right bottom;
    }

    0% {
        -webkit-transform:rotate(-90deg);
        opacity:0
    }

    100%{
        -webkit-transform:rotate(0);
        opacity:1
    }
}
@afelix
Copy link
Contributor

afelix commented Sep 14, 2012

Thank you. Will fix it ASAP.

@sokra
Copy link
Contributor

sokra commented Sep 17, 2012

I think this is a similar issue:

div {
    height: -webkit-calc(100% - 30px);
    height: -moz-calc(100% - 30px);
    height: -ms-calc(100% - 30px);
    height: -o-calc(100% - 30px);
    height: calc(100% - 30px);
}

minimized:

div{height:calc(100% - 30px)}

afelix added a commit that referenced this issue Sep 17, 2012
@afelix
Copy link
Contributor

afelix commented Sep 17, 2012

2sokra: nope, it is another bug. Thanks, almost fixed that.
For history reasons let it be here: #81

@tomByrer
Copy link

tomByrer commented Dec 4, 2013

Has this bug been fixed, & not closed yet? It is a breaking bug for CSS animations.
TIA

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

5 participants