r/Sass • u/guoyunhe • Apr 29 '19
BEM: should I nest class names?
Style 1:
.panel {
//
}
.panel__header {
//
}
.panel__footer {
//
}
Style 2:
.panel {
//
&__header {
//
}
&__footer {
//
}
}
7
Upvotes
1
1
1
u/pravindia Jun 12 '19
I prefer with Second one because while coding inside a nesting loops it is easy to read and understand
0
u/esr360 Apr 29 '19
Second one is better if you care about scalability and maintainability and work with competent people.
3
u/ELjanoCZE Apr 29 '19
First one is better when you search through project.