Open collimarco opened 1 year ago
I'm not an expert but if I had to choose, I'd go for the first one. The other two make no sense for me. The second one implies there is a property with a block name indicator, which would break your naming in the future. BEM doesn't use other selectors other than class-based ones, so avoid descendant selectors if you want to keep everything fully BEM.
For example, if you have:
Now I want to have a bigger
h1
for the variantarticle--featured
.article__title--featured
toh1
if I want to apply some styles to that element for the variation?article--featured__title
?article__title
and style it in CSS using a descendant selector.article--featured .article__title
?This is not clear from the spec.