Closed woosaj closed 8 years ago
Hi, @woosaj!
You shouldn't reflect DOM structure in naming. Code of the example is just great.
See https://en.bem.info/methodology/faq/#why-does-bem-not-recommend-using-elements-within-elements-block__elem1__elem2 for more details.
@tadatuta, Thanks for quick answer. If I understand correct your first sentence is I shouldn't use <figure class="figure">
but something else?
figure
is just ok if it's really a figure semantically. By saying not to reflect DOM structure I meant nesting in elements naming (post__figure
and figure__image
are good and post__figure__image
is not).
Thanks for deeper clarification. I'm really liking BEM so far :)
Hello, I'm new to BEM and I want to get opinion on something, so lets say I have blog post, in blog post we have title, badge, summary, figure ... below is the example of my html
So should I do
.post_figure
and then inside.post__figure__image
and.post__figure__caption
or should i create new block like in example?