postcss / postcss-nested

PostCSS plugin to unwrap nested rules like how Sass does it.
MIT License
1.15k stars 66 forks source link

"> *" errors after 5.0.3 #121

Closed abstractball closed 3 years ago

abstractball commented 3 years ago

example code:

&.has-icon {
  @apply inline-flex justify-center items-center;

  /* Have the icon not ride on the edge of a label */
  > * {
    @apply mx-1
  }
}

If I stay at 5.0.3 of the package, no error will occur, however if I go above 5.0.3 I will receive the error until I comment out the > * part. Using Next.js 10 and Typescript 4.2

error - ./project/styles/components.css ((webpack)/css-loader/cjs.js??ref--5-oneOf-5-1!(webpack)/postcss-loader/cjs.js??ref--5-oneOf-5-2!./proejct/styles/components.css) TypeError: Cannot set property 'parent' of undefined

ai commented 3 years ago

Can you try & > *?