mirror of
https://github.com/snachodog/just-the-docs.git
synced 2026-06-04 19:58:51 -06:00
Initial commit
This commit is contained in:
Generated
Vendored
+61
@@ -0,0 +1,61 @@
|
||||
# selector-no-redundant-nesting-selector
|
||||
|
||||
Disallow redundant nesting selectors (`&`).
|
||||
|
||||
```scss
|
||||
p {
|
||||
& a {}
|
||||
//↑
|
||||
// This type of selector
|
||||
}
|
||||
```
|
||||
|
||||
The following patterns are considered warnings:
|
||||
|
||||
```scss
|
||||
p {
|
||||
& a {}
|
||||
}
|
||||
```
|
||||
|
||||
```scss
|
||||
p {
|
||||
& > a {}
|
||||
}
|
||||
```
|
||||
|
||||
```scss
|
||||
p {
|
||||
& .class {}
|
||||
}
|
||||
```
|
||||
|
||||
```scss
|
||||
p {
|
||||
& + .foo {}
|
||||
}
|
||||
```
|
||||
|
||||
The following patterns are *not* considered warnings:
|
||||
|
||||
```scss
|
||||
p {
|
||||
&.foo {}
|
||||
}
|
||||
```
|
||||
|
||||
```scss
|
||||
p {
|
||||
.foo > & {}
|
||||
}
|
||||
```
|
||||
|
||||
```scss
|
||||
p {
|
||||
&,
|
||||
.foo,
|
||||
.bar {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user