Rule bem-depth
will enforce how many elements a BEM selector can contain.
max-depth
: number (defaults to1
)
When enabled (assuming max-depth: 1
) the following are disallowed:
.block {
&__element {
&__subelement {
// two elements
}
}
}
.block__element__subelement__subelement-two {
// three elements
}