Design comparison
SolutionDesign
Solution retrospective
What challenges did you encounter, and how did you overcome them?
It was tricky to figure out how to prevent vertical and horizontal content loss on smaller viewports, e.g. less than 320px (see the screen recording). Here's the snippet that worked for me (and resulting recording):
const Main = styled.main` ... min-width: fit-content; min-height: 100%; display: flex; justify-content: center; align-items: center; `; const CardWrapper = styled.div` // Don't grow horizontally more than minimally possible to contain the card // I guess it works because nested image has fixed dimensions max-width: min-content; ... img { display: block; width: 288px; height: 288px; } `;
Community feedback
- @d-elvPosted 4 months ago
Honestly man this looks great, I couldn't really point to a specific thing to improve on. Only differences in how I approached it.
I've been taught to always use class names for styling as it helps with debugging, but like I say, I'm not sure how I would improve upon your solution.
0
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