Nested @if, @else if, @else, @for, @while, @each directives is a key ingredient for making what's known as "Spaghetti code". Such code is hard to read, refactor and therefore maintain.

Noncompliant Code Example

With default maximum depth of 3:
@if $x == 0 {
  ...
  @if $y == 1 {
    ...
    @while $z < 10 {
      ...
      @if $a == 1 {   /* Noncompliant: depth is 4 */
        ...
      }
    }
  }
}

Compliant Solution

With default maximum depth of 3:
@if $x == 0 {
  ...
  @if $y == 1 {
    ...
    @while $z < 10 {
      ...
    }
  }
}