@amit-kumar-18
Submitted
What is the best/better practice for responsive layout @media-query / bootstrap or other CSS frameworks?
@ObaidAshraf
@amit-kumar-18
Submitted
What is the best/better practice for responsive layout @media-query / bootstrap or other CSS frameworks?
@ObaidAshraf
Posted
Great work. I can see that RESET bug is also fixed. But, I just found another bug in the code which also seems a minor glitch and can be fixed easily.
If I add Bill as "10" and Number of People as "1", now if I add lets say 10 in "Custom" box, it works fine like it is intended to. Now, if I write "100" it still works fine, The problem arises when I keep increasing number of zeros. Lets say, I added 10,000 or even 100,000. At this point, UI starts to show incorrect data and behavior.
@amit-kumar-18
Submitted
What is the best/better practice for responsive layout @media-query / bootstrap or other CSS frameworks?
@ObaidAshraf
Posted
Great .. You have fixed the points I mentioned. however I found another bug in it :) ..
On RESET, the textboxes do show 0 value and it looks like everything is reset (or back to zero) but if I press any of the tips percentage box, it shows results according to last inserted value.. I think internal variables are not zero ..
If I refresh the page and press any of the Tip percentage boxes, it shows NaN in Tip/person box which I think should always show zero if there is no input ..
@amit-kumar-18
Submitted
What is the best/better practice for responsive layout @media-query / bootstrap or other CSS frameworks?
@ObaidAshraf
Posted
The UI is very good and almost matches with the desired design. However, there is one issue which I observed that for a Bill value of 12, number of people 5 and Tip % as 5%, 10% or 50%, the corresponding "Tip Amount" and "Total" shows a value which contains multiple numbers after decimal places and the text goes out of the Calculator window which does not produce good result. I would suggest to round the value upto like 3 or 4 decimal places.
Instead of reloading the whole page on pressing "RESET" button, I would suggest to just zero out all values and variables.
Bootstrap is a good choice for beginners and provides a number of classes to make design responsive. You can also give a try to tailwindcss.