til

Valid CSS nested selectors

css
/* 🛑 Invalid selectors */
.char {
  p {
    ...;
  }
}

/* ✅ Valid selectors */
.chart {
  & p {
    ...;
  }
}
.chart {
  > p {
    ...;
  }
}
.chart {
  :is(p) {
    ...;
  }
}
.chart {
  .message {
    ...;
  }
}
.chart {
  .message & {
    ...;
  }
}

Parsing rules from nesting spec

I learnt this from @argyleink