Social Proof Website Section using CSS Grid and Flexbox
Design comparison
Solution retrospective
Thank you for having a look at my code. I found BEM class naming to be difficult and would appreciate feedback and suggestions to improve the naming.
Community feedback
- @correlucasPosted about 2 years ago
๐พHello Francis Wafula, congratulations for your new solution!
Answering your question:
I think the best approach to apply BEM in this case is that you divide the big blocks of elements into sections, for example the section with the main heading and the rating you can name it like this:
<div class="hero"> <section class="hero__text"> <figure class="hero__ratings"> </div>
You can see that for the block you've
hero
and two underscore to indicate whats is inside of ithero__CONTENT
it there was a modifier like a rating section that was black the class naming will be likehero__rating--black
you use--modifier
Here's a good guide to learn
BEM
thats really well explained how to use it:https://css-tricks.com/bem-101/
โ๏ธ I hope this helps you and happy coding!
0@franco2kePosted about 2 years ago@correlucas Thanks for the feedback and the learning guide link too.
1@correlucasPosted about 2 years ago@franco2ke thats fine, then say me if works for you
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