This is a solution to the Calculator app challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- See the size of the elements adjust based on their device's screen size
- Perform mathmatical operations like addition, subtraction, multiplication, and division
- Adjust the color theme based on their preference
- Bonus: Have their initial theme preference checked using
prefers-color-scheme
and have any additional changes saved in the browser
For the first time ever, besides having dark mode in Sass, I also detected, using JS, the user's preferred theme according to the system settings using the matchMedia method.
- How to Create a Dark Mode in Sass
- Ekaterine Mitagvaria's code
- useEffect (to show the result)
- Run useEffect Only Once
- matchMedia() method
- Github - daniel-web-developer
- Frontend Mentor - @daniel-web-developer