Design comparison
SolutionDesign
Community feedback
- @Maksym-PaselskyPosted about 1 year ago
Hi,
I think you can use same style for statictic containers and separate style for colors.
Basically all four statistics are the same but different colors. To avoid code duplication you can use separate styles 📝
.statistic-container{ display: flex; border-radius: 10px; gap: 60px; padding: 0 10px 0 10px; width: 100%; } .red { background: hsla(0, 91%, 73%, 0.08); }
and then combine styles in HTML 🪄
<div class="statistic-container red">...</div> <div class="statistic-container yellow">...</div>
same goes for other styles related to statistic
also you can aplly mobile styling using media-query by changing flex-direction.
Nice work. Keep going🤘
Marked as helpful0@DuvanJRPosted about 1 year agoHi @Maksym-Paselsky Thank you very much for the comments, so I can continue improving my code for a clean web development
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