scss-lint icon indicating copy to clipboard operation
scss-lint copied to clipboard

Count an intersection selector as one level of nesting

Open andfinally opened this issue 7 years ago • 0 comments

With a rule that includes an intersection selector, like

.has-image {
    .share-buttons-top {
        .share-button.google {
            // ...
       }
    }
}

The NestingDepth linter complains

Nesting should be no greater than 3, but was 4

In my opinion this is incorrect - there are three levels of nesting in this rule, not four. The linter is counting one node as two.

andfinally avatar Apr 27 '18 14:04 andfinally