Design comparison
SolutionDesign
Solution retrospective
I feel there's an easier way to change between the themes suggestion are really appreciated!
Community feedback
- @ClonephazePosted 11 months ago
"I feel there's an easier way to change between the themes suggestion are really appreciated!"
Personally I would suggest creating a list of variables for the colors, then a new css class that redefines that list of colors for dark mode. Then have your javascript add or remove that class from your main body element. Allows for smooth transitions without writing animations, less javascript overall, and keeps an easily maintained/editable list of colors. That's how I approached it myself.
Marked as helpful0
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