All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.css.checks.l10n.scss.nested-rulesets.html Maven / Gradle / Ivy

There is a newer version: 4.13
Show newest version

Nesting too many rulesets makes the code hard to read, refactor and therefore maintain.

Noncompliant Code Example

With the default threshold of 3:

.foo-1 {
  // ...
  .foo-2 {
    // ...
    .foo-3 {
      // ...
      .foo-4 {                    /* Noncompliant: depth = 4 */
        background-color: blue;
        .foo-5 {                  /* depth = 5, exceeding the limit, but issues are only reported on depth = 4 */
          //...
        }
      }
    }
  }
}

stylelint Related Rules





© 2015 - 2024 Weber Informatics LLC | Privacy Policy