Skip to content

Latest commit

 

History

History
64 lines (50 loc) · 726 Bytes

File metadata and controls

64 lines (50 loc) · 726 Bytes

block-no-redundant-nesting

Disallow nesting a single block if it could be merged with its parent block.

.foo {
  .bar {}
}

Sass official docs on nested properties.

Options

true

The following patterns are considered warnings:

.foo {
  .bar {}
}
.foo {
  &-bar {
    &-baz {
      color: red;
    }
  }
}

The following patterns are not considered warnings:

.foo .bar {}
.foo-bar-baz {
  color: red;
}
// multiple child blocks
.foo {
  .bar {}
  &-baz {}
}
// parent or child with selector list
.foo {
  .bar, .baz {}
}

.foo, .bar {
  &-baz {}
}