parcel-bundler / lightningcss

An extremely fast CSS parser, transformer, bundler, and minifier written in Rust.
https://lightningcss.dev
Mozilla Public License 2.0
6.55k stars 190 forks source link

Nesting in Svelte/Vite throws error #810

Closed mattpilott closed 2 months ago

mattpilott commented 2 months ago

I must be doing something wrong but using nesting syntax is not working.

This works:

.foo {
  color: red;

  & .bar {
    color: blue;
  }
}

But this does not:

.foo {
  color: red;

  .bar {
    color: blue;
  }
}

I can't see why this would be the case.

Here's a repro https://stackblitz.com/edit/sveltejs-kit-template-default-lgagqb?file=src%2Froutes%2F%2Bpage.svelte

mattpilott commented 2 months ago

Vite preprocess was not running, closing