canonical
Version:
Canonical code style linter and formatter for JavaScript, SCSS, CSS and JSON.
48 lines (37 loc) • 489 B
Markdown
# Force Element Nesting
Rule `force-element-nesting` will enforce the nesting of elements
## Examples
When enabled, the following are disallowed:
```scss
div p {
content: '';
}
.parent {
&__child h1 {
content: '';
}
}
a[target="_blank"] span {
content: '';
}
```
When enabled, the following are allowed:
```scss
div {
p {
content: '';
}
}
.parent {
&__child {
h1 {
content: '';
}
}
}
a[target="_blank"] {
span {
content: '';
}
}
```