Design comparison
Solution retrospective
Is it normal to have this many classes?
Community feedback
- @joewild90Posted over 1 year ago
Hey Keiran! Congratulations for mastering the challenge :-)
I think the amount of classes in your code it is not a problem. I give every HTML element a class and do not use element selectors (except maybe some base rules for H1-H6 and stuff). For me the best approach is something like BEM where you assign multiple elements to the same block/component and therefor they all contain the same name, e.g.
.card__image or .card__circle
. For me it is less confusing than to have 100 completely different classes like .left-circle, .left-score, .right-circle.... I hope you get my point :-)Cheers & Happy Coding
Marked as helpful1
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