Design comparison
Community feedback
- @EricS02Posted about 2 months ago
Great job with the project Lance!
Your image styling repeats multiple times for different articles (.article-1, .article-2, etc.). You can simplify this by combining the shared properties.
article .info > img { width: 1.8rem; height: 1.8rem; border-radius: 2rem; }
.article-1 .info > img { border: 2px solid hsl(263, 63%, 64%); }
.article-2 .info > img { border: 2px solid hsl(0, 0%, 81%); }
DRY Principle (Don't Repeat Yourself) with Flexbox: You use display: flex; flex-direction: column; gap: 1rem; in almost every article. Move these common properties to a global article selector and only override unique styles as needed.
article { display: flex; flex-direction: column; gap: 1rem; }
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