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

Add ignore rule for pseudo-classes to max-nesting-depth #5

Open
jasonlemay opened this issue Sep 19, 2019 · 0 comments
Open

Add ignore rule for pseudo-classes to max-nesting-depth #5

jasonlemay opened this issue Sep 19, 2019 · 0 comments

Comments

@jasonlemay
Copy link

Current problem

.class-depth-1 {
  .class-depth-2 {
    .class-depth-3 {
      text-decoration: none;

      &:hover { // <- This is considered 4th level of nesting
        color: red;
      }
    }
  }
}

As this will output:

.class-depth-1 .class-depth-2 .class-depth-3 {text-decoration: none}
.class-depth-1 .class-depth-2 .class-depth-3:hover {color: red}

Proposed solution
Could we consider adding ignore: ["pseudo-classes"] to max-nesting-depth? I'm really against nesting more than 3 levels down, but pseudo-classes should not be considered nesting, in my opinion. As right now anyway I could write .class-depth-3:hover and that would pass, producing the same compiled result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant