Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 4 years ago

Tip calculator - html , sass and javascript

Chamu•13,820
@ChamuMutezva
A solution to the Tip calculator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I had not used the reset before, and tried to use it this time around. Whilst it cleared the inputs automatically, i still have to figure out its proper use as my variables are not being reset - reset.addEventListener("reset", function())

  • where reset is the reset button. Looks like i need to add the eventlistener on the form rather than the reset button Let me know of any bugs and improvement
Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Davide•1,705
    @Da-vi-de
    Posted almost 4 years ago

    Hi Chamu, It looks very good, well done! I did try it and everything works just perfect, on mobile as well, either in Chrome and Firefox. Nothing failed! Happy coding :-)

    Marked as helpful
  • hardy•3,640
    @hardy333
    Posted almost 4 years ago

    Hey everything works great. Nice Job.

    One quite important suggestions:

    • Try to remove invalid outline on inputs if user clears input,
  • Azka•480
    @Azkanorouzi
    Posted almost 4 years ago

    hello chamu nice work ! I would be appreciate if you take a look at my solutions and give me your honest advice😊

  • Mariusz Olszewski•360
    @molszewski34
    Posted over 3 years ago

    Hey can you explain me why you used so many external files .map? It's first time i see something like this and i am curious about it. Why you separated code in so many files in dist folder?

  • Account deletedPosted over 3 years ago

    Everything works fine ! I would add an opacity: 0 or display: none to the input:radio. If I navigate with my keyboard (tab key), it displays the input-radio of the first tip (5%). Quite strange :)

  • Chamu•13,820
    @ChamuMutezva
    Posted almost 4 years ago
    • the reset button is failing on my mobile. What did I miss?

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Frontend Mentor for Teams

Frontend Mentor for Teams helps companies and schools onboard and train developers through project-based learning. Our industry-standard projects give developers hands-on experience tackling real coding problems, helping them master their craft.

If you work in a company or are a student in a coding school, feel free to share Frontend Mentor for Teams with your manager or instructor, as they may use it to help with your coding education.

Learn more

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub