Design comparison
Solution retrospective
any feedback will be appreciated!
Community feedback
- @SupaSibsPosted almost 3 years ago
just some feedback, take this with a grain of salt as i didn't even complete this challenge, but you can use :focus and save lines in js instead of doing an if statement to add classes, also I'm pretty sure event doesent have to be an argument for it to work. so for handleClick something like tipval = parseFloat(event.target.innerHTML), and for calculating the percentage I would divide by one hundred in that function to avoid confusion.
0 - @HYDROCODERPosted over 3 years ago
Hey there! Good job. There are some things I would suggest here if you don't mind:
-
Do put some comments in your code. It will be helpful to others as well as for yourself if you ever need to look at it again.
-
You have some accessibility issues. I would suggest to go through articles on semantic HTML if you wish to correct them.
-
You can remove the arrow buttons in your bill and no. of people input fields using the following code:
/* Chrome, Safari, Edge, Opera */ input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } /* Firefox */ input[type="number"] { -moz-appearance: textfield; }
-
You have put a default tip percent of 15% and a default number of people. I would suggest you to remove that by making changes in your js code.
Hope it helps :).
0@azzykesumaPosted over 3 years ago@HYDROCODER yeah i keep getting accessibility issues with my HTML but i don't understand where i get it wrong, and as for the fourth suggestion, i do look up to the design and i think the 15% value is the default value since it in clicked state, but perhaps i am wrong though, thanks!
0 -
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