Skip to content

A Tip Calculator App that calculates the tip and total amount to be paid by each person according to a bill

Notifications You must be signed in to change notification settings

LiyanNguyen/tip-calculator-app

Repository files navigation

Tip Calculator App

A Tip Calculator App that calculates the tip and total amount to be paid by each person according to a bill


⚠️ Update 30/4/2022

  • This project has been updated to use LESS CSS Preprocessor 😊
  • This project has been updated to use TypeScript 💪

Frontend Mentor - Tip calculator app solution

This is a solution to the Tip calculator app challenge on Frontend Mentor.

Screenshot

image image

Links

My Process

  • Design the Desktop Viewport WHILE desinging the Mobile viewport at the same time
  • Design the flex/grid system, making sure to have both Desktop and Mobile Viewport layout correct
  • Add in all the other HTML content
  • Finished up all the initial static CSS designs
  • Add in the hover and focus CSS states
  • Add JS functions to the pre-determine tip buttons and custom tip input
  • Add JS to make calculations everytime an input is made
  • Add JS to make the reset buttons change (there is 2 reset buttons overlaying one another)
  • Add JS for the reset button
  • Add JS to prevent user from using the - and + keys
  • Final testings before deployment

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Grid
  • Desktop-first workflow

What I Learned

  • More Flexbox
  • Flex-wrap trick - to make row into columns on smaller viewports (depeding on element's width)
  • Flex and margin-top:auto trick - to make the reset button always be on bottom of the flex
  • Always use vh/vw as a starting point, then %width and %height then use rem units on smaller things

Author

Acknowledgments

About

A Tip Calculator App that calculates the tip and total amount to be paid by each person according to a bill

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published