Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

172
Views
With styled-components, how to use the longform css animation syntax to have multiple keyframed animations?

So when an animation is created via the longform declaration and it has multiple specified names:

const animationNameCss = css`
    //insert keyframes here
`

let animatedImg = styled.img`
        animation-name: ${animationNameCss}, ${animationNameCss};
        animation-delay: 0, 200ms;
        animation-duration: 200ms;
        animation-timing-function: linear;
        animation-iteration-count: 1;
      `;

Only the first animation is performed. Is this related to concatenating tagged templates or simply not supported in styled-components? The intent is to create multiple animations that play back to back of 200ms each by concatenating animation-name and animation-delay.

AnimationNameCss is dynamically set to one of 8 different keyframe sets in the real code.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I'm actually wrong, it does work like this. The issue was actually in animation-delay: 0, 200ms;

That should be 0ms, 200ms and the animation performs as expected.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!