Design comparison
Solution retrospective
I am using javascript for the first time in a challenge.
Community feedback
- @lukasrihaPosted over 3 years ago
Hi sos97!
Well done considering this is your first time using javascript. However, I think changing all the colors using javascript is a bit overkill. If I were to implement this, I would be toggling the class name of your grid component, and have css handle the rest. For instance you'd have three classes
.grid.regular-theme { background-color: .... } .grid.dark-theme { background-color: .... } .grid.light-theme { background-color: ... }
This way you can style everything based on the class of your root component :) But that's just what I would do, there's a milion ways to do things :) Happy Coding!
Marked as helpful1@sos97Posted over 3 years ago@onenKokos Thanks for the suggestion. The varying class method is really great! :)
0
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