User-editable divs, JS validation and reset

Solution retrospective
I'm proud of the interactivity of this one, the JS that makes it calculate on the fly and dynamically change appearances based on the presence of valid inputs.
What challenges did you encounter, and how did you overcome them?I tried to keep the javaScript clean and DRY, but I don't think I succeeded that well. It does the job but it isn't very pretty.
Otherwise my biggest challenge on this one had to do with inputs, which kept mucking up the container widths. I ended up using divs with contenteditable=true
instead, which worked great for layout purpuses, but on the flip side made the JS a lot more complicated.
I used ChatGPT a few times on this one, but never to write actual code, only for debugging and troubleshooting.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @SimonHickling
This is very good. Maybe you could add an upper limit on the bill amount, to stop the numbers running outside of the div border?
Marked as helpful
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