mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-14 13:53:32 -06:00
Initial commit
This commit is contained in:
68
node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
generated
vendored
Normal file
68
node_modules/stylelint-scss/src/rules/declaration-nested-properties-no-divided-groups/README.md
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
# 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](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#nested_properties).
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
*/
|
||||
```
|
Reference in New Issue
Block a user