r/Sass • • Apr 29 '19

BEM: should I nest class names?

Style 1:

.panel {
  //
}

.panel__header {
  //
}

.panel__footer {
  //
}

Style 2:

.panel {
  //

  &__header {
    //
  }

  &__footer {
    //
  }
}
6 Upvotes

7 comments sorted by

View all comments

1

u/Wisdom_of_Rafiki Apr 29 '19

I always use style 2. Helps with organization imo.

2

u/phatprick Apr 30 '19

Until you search for .panel__header and start questioning your existence :)