Skip to content

EugeneZanevskij/Tip-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tip calculator app

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

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the app depending on their device's screen size
  • See hover states for all interactive elements on the page
  • Calculate the correct tip and total cost of the bill per person

Screenshot

Desktop empty version

Calculated version

Mobile version

Links

My process

Built with

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

What I learned

Use this section to recap over some of your major learnings while working through this project. Writing these out and providing code samples of areas you want to highlight is a great way to reinforce your own knowledge.

To see how you can add code snippets, see below:

When clicking on button we can prevent form from submitting 2 ways:

<button type="button"></button>
event.preventDefault();

We can reset form using this:

document.getElementById("form").reset();

Continued development

In future projects I want to continue focusing on working with some kind of forms, inputs.

Useful resources

  • StackOverflow - This helped me to overcome problem with submitting form, how to round the number to the nearest tenth.
  • MDN - Documentation.

Author