question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

keyframe animation not working

See original GitHub issue

animate-spin generates this code:

@keyframes svelte-1fil0v3-spin {
    :global(.windi-sdy900) {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg)
    }
}

Which doesn’t work. Real tailwind generates this instead:

@keyframes spin {
    to {
      transform: rotate(1turn);
    }
  }

Not sure if this is svelte specific, but I reproduced the issue with the rollup example in this repo: https://github.com/lawrencecchen/svelte-windicss-preprocess/tree/main/example/rollup

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
alexanderniebuhrcommented, Feb 26, 2021

@noahsalvi @lawrencecchen for now workaround is to set combile: false and globalUtility: false I will work on a fix for compile mode

1reaction
noahsalvicommented, Feb 26, 2021

Im facing the same problem with animations not working and setting compile to false in my rollup file did not fix it for me. The bundled output is:

@keyframes svelte-tec5th-spin {
  :global(from) {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  :global(to) {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@-webkit-keyframes svelte-tec5th-spin {
  :global(from) {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  :global(to) {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS Animations Not Working? Try These Fixes - HubSpot Blog
In CSS animations, the @keyframes rule defines how the animation looks, or, more specifically, which element styles change and when. Without ...
Read more >
CSS @keyframes not working in Chrome - Stack Overflow
I have tried to use @-webkit-keyframes but the text doesn't move either in Chrome. It works fine with -webkit-keyframes and -webkit-animation .
Read more >
Keyframes not working the way it's intended - HTML & CSS
I don't understand this psuedo element , I understand what hover does, but shouldn't the animation element apply to both parent and child...
Read more >
Keyframes (transform animation) is not working on Chrome
Keyframes (transform animation) is not working on Chrome. Hi guys, I have an issue where my keyframes work properly on Firefox but don't...
Read more >
CSS keyframe animation not working in Chrome
This is my first attempt at animation. After much fiddling, I was able to get this to work as I wanted. However, it's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found