Design comparison
Solution retrospective
I appreciate any suggestion to improve my code! Feel free to tell me what I could have done better. Making the background with the svg's was the hardest part. I created 4 media queries to get as close as possible to the design, but i feel i could have done it in an easier way. The BEM conventions weren't as useful as i thought they would be, in fact i ended up creating many redundant rules.
Community feedback
- @correlucasPosted over 2 years ago
๐พCiao Vittorio, congratulations for your solution!
I've inspected the code of your solution and I note that you've used BEM, congrats for that, you've done a good structure, to be sincere I don't like BEM because the classes are really long, but I cannot deny that's useful, so you did good by starting to use this css naming convetion.
About your code I've some tips for you:
- You card component is responsive and this good, but note that the profile image isn't resizing as the other contents and the card stats start to behave strange when the window gets under
width: 300px;
one way to fix that is usingflex-wrap: wrap;
or that you create a media query to change this section direction. Here's the fix:
.card__content__stats { /* display: flex; */ flex-wrap: wrap; margin-top: 2rem; border-top: 1px solid rgb(232, 232, 232); display: flex; justify-content: space-between; align-items: center; padding: 2rem 3rem 2rem 3rem; } @media (max-width: 280px) { .card__content__stats {flex-direction: column;}}
Hope it helps you and happy coding!
Marked as helpful0 - You card component is responsive and this good, but note that the profile image isn't resizing as the other contents and the card stats start to behave strange when the window gets under
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