Tip-Calculator With CSS Grid, CSS Flexbox, Vanilla Javascript

Solution retrospective
I think I did really good on this project. I had a very hard time trying to put dots inside the zeros and am not sure how to do it. Also, never figured out how to add colors to the dollar images on the right side of the app. This was my first time using Javascript but I feel like maybe I could have had a better solution with that. But out of all of this, the most important I want to know is how to make this compatible with mobile devices(which I know requires media screen with CSS). Any suggestions??
Please log in to post a comment
Log in with GitHubCommunity feedback
- @ZainMhrez
Hi Larry, you did nice work. I think the process to calculate the tip and the total bill need some updates: the tip for each person = (bill_value * tip_percent) / people number. the total bill for each person = (bill_value + (bill_value * tip_percent)) / people number.
I wish this will help you, good luck.
- @BenConfig
The 'dots inside the zeros' are a feature of the Space Mono font family. It looks like you are using the Roboto font family which does not have the dots.
Why not just use the character '$' and then you can apply the
color
property?You should try building the page for mobile first. The mobile design is usually much simpler than the desktop design so it makes sense to start with that. You then apply media queries when you have more viewport space to work with.
- @nakoyawilson
The dots in the zeros are from the Space Mono font. Your import line for the Space Mono font is currently incomplete so it's not being imported properly. If you use the following import and change your ff-primary and ff-secondary to
'Space Mono', monospace;
the Space Mono font should work properly on your page.@import url("https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap");
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