This guide should be thought of as a default rather than an absolute. If there’s a good reason for doing something differently that’s fine. The important thing is to make sure that each component is internally consistent and the overall level of code quality is high. The only requirement for making an exception is that you’re able to provide a good reason if someone asks you why.
Use BEM where it makes sense, and default to nesting using ampersands e.g. this
.block {
&__element {
}
&--modifier {
}
}
If it makes sense to write selectors out longhand, e.g. because it works better with the required media queries, then that’s fine. Making the code readable and easy to maintain is more important than absolute consistency.
Avoid repeated behaviours and styles Even if you have to refactor other components to avoid the repetition.