Responsive Light/Dark mode Layout for Social Proof Section Component
Design comparison
Solution retrospective
I created a dark theme version and used media queries to check what the user's preference is and it will display it based on what the browser preference is. With this I duplicated them changed the svg opacity and created a version for dark theme. Also, instead of placing 5 versions of the star image in the ratings, I made an empty div with it as the background, and adjusted the height/width and used background-size: contain and background-repeat space to have it show 5 stars. You could adjust this for full star ratings, but I would have to change to using JS if I needed to account for portions of a star.
What challenges did you encounter, and how did you overcome them?Biggest challenge was working with the background and adjusting them to fit. I ended up for-going the mobile version of the background and just using the desktop positioned to work with both.
What specific areas of your project would you like help with?Nothing in particular, but will always take suggestions and critiques.
Community feedback
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