- Nesting:
.anElement {
&_aBlock {
…
}
&_anotherBlock {
…
}
&_anotherBlockAgain {
&:hover {
…
}
}
}
- Limiting Nesting to Pseudo Elements:
.anElement {
…
}
.anElement_aBlock {
…
}
.anElement_anotherBlock {
…
}
.anElement_anotherBlockAgain {
&:hover {
…
}
}
I prefer to restrict nesting to pseudo-elements. Wider usage, as in the
Nesting
example, I've found can make it harder to read, and harder to find instances of a specific class when searching across a code base.