Rating component with simple animations

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:
but I think in modern css/js there should be a better wayradios.classList.remove('card__radios--alert') radios.offsetWidth //wtf radios.classList.add('card__radios--alert')
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on turtlecrab's solution.
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