Testimonials Grid Section with SCSS, BEM, and CSS Grid
Design comparison
Solution retrospective
This was the fastest project that I've done on Frontend Mentor. It took me literally 2 hours to finish the whole thing with animations, and responsiveness. However, I understand that this is the result of daily practice and nothing makes me happier than seeing these results.
If you have any suggestions, feel free to drop them in comments' section 👨🏻💻 Cheers 👾
Community feedback
- @MojtabaMosaviPosted almost 3 years ago
1- Whenever using a naming convention try to stick to it's rules for the sake of consistency and communication. In BEM exsistance of element is meaningless without a block, example temtimonial__container. A better appraoch is to creatue a resuable component testimonial which can look something like this:
<article class="testimonial"> <h3 class="testimonial__heading"></h3> <blockqoute class="testimonial__text"></blockqoute> <div class="testimonial__profile"> <img class="testimonial__img"> <div class="testimonial__user-info"> <span class="testimonial__name"> </span> <span class="testimonial__status></span> </div> </div> </article>
A little explanation
1- Article tag because it's a self-contained and resuable piece of content.
2- blockqoute because the text is a qoute from the customer.
3- span instead of h2 and p because the later choice is semantically incorrect. Firstly a word is not a paragraph and the profile name is not a heading the satuation is exactly as when you want to write markup for a aritcle with it's author mentioned which you don't expect ot be the heading of the article.
4- h3 because this gonna be used in a context where you need the h2 for section headings.
Keep coding :=)
Marked as helpful0@kens-visualsPosted almost 3 years agoHey @MojtabaMosavi 👋🏻 thanks for the suggestion 👨🏻💻 Cheers 👾
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