Responsive Calculator Page using SCSS.
Design comparison
Solution retrospective
This is a responsive calculator page. I think the theme selector code, that i use javascript, is a little bit complicated. Maybe you guys have a simple ways, and i confuse when i opened this web in desktop and android, the cirlcle in theme slider is a good circle, but when i open in IoS is not. Thank you, feel happy for your advice.
Community feedback
- @EdouardHrgtPosted over 1 year ago
Hey! About the theme switching logic i personally I just created css classes that are changing my variables colors. Then i replace those classes on click event via JS on the global page html wrapper. Feel free to check it out here : https://github.com/EdouardHrgt/TheCalculator/tree/main
Marked as helpful1@putuphillipstevenPosted over 1 year ago@EdouardHrgt Hi, thanks, yap i think css classes are the best method, but i has already make the complicated javascript, so i just go on. But i think i must replace my js method to the js that change classes, thanks once again.
1
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