Design comparison
Solution retrospective
Do you have any ideas how to deal with big numbers overflow? Text was just out of the borders, so i made it reset to 0 when it's too big, but may be there is other solution. I used grid with 2 col by the way
Community feedback
- @DavidMorgadePosted about 2 years ago
Hello Ilya, congrats on finishing this challenge! a pretty hard one IMO, great job
To answer your question, maybe a bit of a workaround could be to add a conditional in your javascript that whenever the output number length is greater than X characters (the numbers of character that can break your container), it increases the width of the container, or reduces the font-sizes of the output numbers.
You could also transform the output for biggest numbers into an exponential character so it takes even less space when the number is a big one!
Hope my feedback helps you! good work!
Marked as helpful1@IlyaChichkovPosted about 2 years ago@DavidMorgade Hello David, thanks for those ideas and feedback, i'll keep it in mind next time! I actually thought about the font size, but I liked this large font text and didn't want to break it's style. Changing width of the container looks like a good way out for this example, as well as, exponential presentation of numbers.
1
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