Design comparison
SolutionDesign
Solution retrospective
I had a problem with the checked radio buttons' color-changing. The label does not work with :focus pseudo class however if I would use button element I couldn't read out the checked one's value in the JavaScript code.
I kept the label-radio version but I couldn't figure out the proper code which can properly switch the label's color when I click it. The code can switch the color of the label in its current state but it can not reset the button's color if the user selects another number before clicks the Submit.
Community feedback
Please log in to post a comment
Log in with GitHubJoin 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