Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Rating component with simple animations

turtlecrab 550

@turtlecrab

Desktop design screenshot for the Interactive rating component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


My second challenge. First time dealing with css animations and I have a question:

  • what's the best way to retrigger css animation from vanilla JS? I used this rather hacky looking way of re-adding a class:
    radios.classList.remove('card__radios--alert')
    radios.offsetWidth //wtf
    radios.classList.add('card__radios--alert')
    
    but I think in modern css/js there should be a better way

Community feedback

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord