Tip Calculator built using Sass & Vanilla JavaScript
Design comparison
Solution retrospective
If you can find any bugs in my solution or if my math is incorrect please feel free to correct me. Any other feedback would also be more than appreciated. Thanks! :)
Community feedback
- @superschoolerPosted over 2 years ago
Hi Andrija, great job on this! The only suggestion I have would be to change the
step
in your inputs from0.01
to1
, especially on the Number of People section. Most people don't go out to dinner with a fraction of a friend, so all it does it make them click 100 times to move the count up by one. I can see how decimals are useful on the total bill, but it would still take forever to get the bill amount right going $0.01 at a time. Just my thoughts! Awesome work 👍Marked as helpful1@andrijaivkovicPosted over 2 years ago@superschooler the reason why I put the step at two decimals is to limit the amount of allowed decimals, so if it has more than 2 it's an invalid input. If you have a better way of making sure that the input doesn't have more than 2 decimals please let me know! Thanks for the provided feedback!
Edit: as for the "number of people" input you are completely correct, I removed the
step
attribute altogether.1@superschoolerPosted over 2 years ago@andrijaivkovic makes sense! I can't find another way around that, unfortunately. I'd probably just change it on the number of people then but leave it on the bill.
1
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