tip-calculator-app-main with HTML, CSS & JS

Solution retrospective
Couldn't figure out hot to maintain active state of the button for hovered color to remain same even when mouse leaves, any idea?
Percentage buttons are styled with Grid and the main container is styled with grid only for desktop site...
Any suggestions...?
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Dyios
Hi, you can make a class that have the styles of the active state and when the user clicks on the tip percentage you add the class to the clicked button.
Marked as helpful - @IDavidSa
You can add a stylized class through a javascript event (in this case, click).
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