Responsive QR Code Component using Flexbox & CSS Grid

Solution retrospective
I'm most proud of keeping my code clean and organized, while making the layout fully responsive on both desktop and mobile. I also managed to use Flexbox and CSS Grid effectively, which helped me understand their differences better.
Next time, I would try to structure my CSS with more reusable classes and possibly use a methodology like BEM for even better scalability.
One of the main challenges was aligning the card perfectly in the center of the page while keeping it responsive. At first, I struggled with margins and padding, but I overcame this by using Flexbox properties like justify-content
and align-items
.
Another challenge was making sure the text size looked good on different screen sizes. I solved this by using relative units (rem
, %
) instead of fixed pixels.
I would love feedback on how I can make my CSS more efficient and reusable.
Also, I’m curious if there are best practices for structuring small projects like this one, so the code remains clean and easy to maintain as projects grow.
Finally, any advice on improving accessibility (like ARIA attributes or semantic HTML) would be very helpful.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on yarden biton's solution.
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