Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 386 Bytes

bem-depth.md

File metadata and controls

26 lines (18 loc) · 386 Bytes

BEM Depth

Rule bem-depth will enforce how many elements a BEM selector can contain.

Options

  • max-depth: number (defaults to 1)

Examples

When enabled (assuming max-depth: 1) the following are disallowed:

.block {
  &__element {
    &__subelement {
      // two elements
    }
  }
}

.block__element__subelement__subelement-two {
  // three elements
}