Skip to content

Latest commit

 

History

History
61 lines (50 loc) · 496 Bytes

File metadata and controls

61 lines (50 loc) · 496 Bytes

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;
  }
}