Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SelectorDepth rule triggering when @each inside of nesting #949

Open
calebergh opened this issue Apr 6, 2018 · 0 comments
Open

SelectorDepth rule triggering when @each inside of nesting #949

calebergh opened this issue Apr 6, 2018 · 0 comments
Labels

Comments

@calebergh
Copy link

calebergh commented Apr 6, 2018

Using version 0.57.0 (from within PHPStorm, with custom lint config file)

With a max selector depth of 3, given the following (simplified code), a warning is thrown which seems in error:

nav {
  li {
    @each $highlight, $colors in $highlight-colors {
      &.button-#{$highlight} {
       // the a below triggers the warning
        a {
          color: map-get($colors, 'color');
        }
      }
    }
  }
}

Warning displayed:

"Selectors should have depth of applicability no greater than 3 but was 4 (SelectorDepth)"

transpiled CSS in this case results in (selector depth of 3):

nav li.button-color-fifteen a {.....}

@sds sds added the bug label Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants