notes/node_modules/stylelint-scss/src/rules/selector-no-redundant-nesti...
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00
..
README.md Initial commit 2017-03-09 13:16:08 -05:00

README.md

selector-no-redundant-nesting-selector

Disallow redundant nesting selectors (&).

p {
  & a {}
//↑
// This type of selector
}

The following patterns are considered warnings:

p {
  & a {}
}
p {
  & > a {}
}
p {
  & .class {}
}
p {
  & + .foo {}
}

The following patterns are not considered warnings:

p {
  &.foo {}
}
p {
  .foo > & {}
}
p {
  &,
  .foo,
  .bar {
    margin: 0;
  }
}