Calculator app using grid and SCSS

Solution retrospective
I had problems centering the calculator vertically on small screens. Using 100svh didn't work, so I finally used Javascript to determine the user's window height. Is there a good solution in CSS?
Also I am uncomfortable with my code organisation. Should a shorter script like that use classes (or one class) already? And it seems overly complicated. At last I decided to perform the actual calculation inside a while loop do do a chain of arithmetical operation in the right order. Are there any more elegant solutions, e.g. a way to use array methods for this? And if - how?
Thank you for any suggestions!
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Stephan Ullmann's solution.
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