Design comparison
Solution retrospective
This was my first project using tailwind css. Still getting used how to use this framework, but I found it very good to style the components and it caused way less things to break in the page because each component has its own classes with the styling parameters, making it easy to spot errors. I tried to use mostly classList.toggle to add and remove the tailwind classes and therefore reducing the number of if...else statements necessary in the code. Also, I added some error messages that were not in the original project to make the form validation more complete (like checking if the card number, month, year and CVC have an appropriate value and the correct number of digits). Feedback is 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