Sha256: 3ac1f5360317a2766eef1f1d45ecc0d5e488e38fd42a1cddaae70ea42295695d

Contents?: true

Size: 1.27 KB

Versions: 24

Compression:

Stored size: 1.27 KB

Contents

# declaration-nested-properties-no-divided-groups

Disallow nested properties of the same "namespace" be divided into multiple groups.

```scss
/* Such groups: */
font: { /* `font` is a "namespace" */
  size: 16px;
  weight: 700;
}
```

A "namespace" is everything before the first `-` in property names, e.g. `margin` in `margin-bottom`. It is the "namespace" that is used as a root identifier for a nested properties group (`font` in the example above).

[Sass official docs on nested properties](https://sass-lang.com/documentation/style-rules/declarations#nesting).

The following patterns are considered warnings:

```scss
a {
  background: url(img.png) center {
    size: auto;
  }
  background: {
    repeat: no-repeat;
  }
}
```

The following patterns are *not* considered warnings:

```scss
a {
  background: url(img.png) center {
    size: auto;
  }
  background-repeat: no-repeat;
}
```

```scss
a {
  background: url(img.png) center no-repeat {
    color: red;
  }
  margin: 10px {
    left: 1px;
  }
}
```

```scss
a {
  background: url(img.png) center {
    size: auto;
  }
  background :red {
    repeat: no-repeat;
  }
}
/* There is no space after the colon in `background :red` so it is considered A SELECTOR and is compiled into: 

a background :red {
  color: blue;
}

*/
```

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-5.0.7 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-5.0.6 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-5.0.5 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-5.0.4 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-5.0.3 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-5.0.2 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-5.0.1 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-4.3.5 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-5.0.0 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-4.3.4 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-4.3.3 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-4.3.2 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-4.3.1 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-4.3 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-4.2.3 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-4.2.2 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-4.2.1 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-4.2 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
trusty-cms-4.1.9 node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md