Design comparison
SolutionDesign
Solution retrospective
For rotating the switch/toggle, I used css rotate within an event handler.
document.getElementById("switch_img").style.rotate = "180deg";
Would be interested to know how others would have done this.
The bonus objective stated that optionally only HTML/CSS could be used, however without JS I am not sure how.
As always, any advice on best practices is also welcome.
Thanks!
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