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 with point in the animation stops not working because escaped #2425

Closed
minimit opened this issue Sep 22, 2020 · 1 comment · Fixed by #2432
Closed

Keyframes with point in the animation stops not working because escaped #2425

minimit opened this issue Sep 22, 2020 · 1 comment · Fixed by #2432

Comments

@minimit
Copy link

minimit commented Sep 22, 2020

Describe the problem:

When using keyframes with a point value in the keyframe stops they gets escaped and they do not work.

Input:

module.exports = {
  purge: [],
  theme: {
    extend: {
      keyframes: theme => ({
        'anim-spinner': {
          '0%': {
            strokeDashoffset: '628',
            transform: 'rotateY(0deg) rotateZ(-90deg)',
            animationTimingFunction: theme('transitionTimingFunction.ease.out'),
          },
          '50%': {
            strokeDashoffset: '0',
            transform: 'rotateY(0deg) rotateZ(90deg)',
            animationTimingFunction: theme('transitionTimingFunction.ease.in'),
          },
          '50.0001%': {
            strokeDashoffset: '0',
            transform: 'rotateY(180deg) rotateZ(90deg)',
          },
          '100%': {
            strokeDashoffset: '628',
            transform: 'rotateY(180deg) rotateZ(-90deg)',
          },
        },
      }),
    },
  },
  variants: {},
  plugins: [],
}

Output:

@keyframes anim-spinner {
  0% {
    stroke-dashoffset: 628;
    transform: rotateY(0deg) rotateZ(-90deg);
  }

  50% {
    stroke-dashoffset: 0;
    transform: rotateY(0deg) rotateZ(90deg);
  }

  50.\30 001\% {
    stroke-dashoffset: 0;
    transform: rotateY(180deg) rotateZ(90deg);
  }

  100% {
    stroke-dashoffset: 628;
    transform: rotateY(180deg) rotateZ(-90deg);
  }
}

You can see that the keyframe 50.0001% becomes 50.\30 001\%

Link to a minimal reproduction:

https://github.com/minimit/twbug-keyframes-escape

@adamwathan
Copy link
Member

Fixed for next version, thanks!

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

Successfully merging a pull request may close this issue.

2 participants