
News Homepage with React (Dark Mode and localStorage API)
Design comparison
Solution retrospective
Hello, in this challenge in addition to making the site responsive I wanted to add a feature that I really like in every site, the dark mode.
I also used the localStorage API to save the choice of using dark mode. I did this in React.
Having started React relatively recently, do you have any advice? Thank you very much!
Please log in to post a comment
Log in with GitHubCommunity feedback
- Account deleted
Hi, to keep your images proportions when resizing, you can use
object-fit: contain
and to avoid bugs with the transitions, use the specific css target property instead ofall
, which causes that all the elements animate the size when resize. If you have more questions let me know.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