Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Tip Calculator built using Sass & Vanilla JavaScript

P
Andrija 510

@andrijaivkovic

Desktop design screenshot for the Tip calculator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

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

@superschooler

Posted

Hi Andrija, great job on this! The only suggestion I have would be to change the step in your inputs from 0.01 to 1, 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 helpful

1

P
Andrija 510

@andrijaivkovic

Posted

@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

@superschooler

Posted

@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 GitHub
Discord logo

Join 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