Design comparison
Solution retrospective
My second Junior challenge completed.
It was fun figuring out how to style the toggle switch button and create the custom slider on this one. Had to dig through a number of tutorials and examples but finally got it sorted. It was nice to get back to JS (haven't really touched it in years).
Learned a neat trick along the way, using a data-*
attribute to show the word discount on the larger screen sizes.
Managed to get everything working in Firefox, Chrome, Edge, and Safari with one small nit, can't seem to remove the border on the slider thumb for Safari; if anyone knows how please let me know how in the comments.
Feedback welcome.
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