Design comparison
Solution retrospective
Any feedback or advice is more than welcome, specially on the JS code. Thanks!
Community feedback
- @MrparasgediyaPosted over 3 years ago
Hi there, i found some small changes to your js code in handleClick func you can use id instead of innerHTML and there is no need to calculate person value in for each loop and you can replace calculate person value by using setpersonvalue func out of for loop, and if you are using setpersonvalue function after for each loop the there is no need to use calculate tip. in setpersonvalue func here you are using timeout to remove warning but warning removed after 5 sec if customer no is greater then 0. here timeout return function to stop timeout and you can store it in global variable and you can use if customer count is more then one and there is warning timeout running then you can close timeout by simply calling global variable func. i hope this info will very helpful for you. Thank you :)
0 - @afrusselPosted over 3 years ago
Hi, well effort. There are some issue which I found:
- Use flexbox or use a width for both side gap like
width: 90%;
- Take the
.calculator
in the middle horizontally and vertically - Use
font-size
rem
if possible.
Happy Coding :)
0@LidiaRJPosted over 3 years agoHi @afrussel,
By taking the .calculator in the middle horizontally and vertically you mean applying the properties justify-content and align-items to the parent element?
I appreciate the feedback! Thanks :D
0 - Use flexbox or use a width for both side gap like
Please log in to post a comment
Log in with GitHubJoin 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