Describe the bug
This input CSS:
@layer b {
body {
color: green;
}
}
@layer b;
results in the first @layer rule being deleted.
Expected behaviour
It should be equivalent to the output from this:
@layer b {
body {
color: green;
}
}
@layer b {}
@layer rules without a block should be treated the same as if they had an empty block.
See this codepen for how it behaves in the browser: https://codepen.io/devongovett/pen/YzoxjPM
Steps to reproduce
see above
Version
latest
Preset
default
Environment
Package details
https://cssnano.github.io/cssnano/playground/
Additional context
Related upstream bug in Next.js vercel/next.js#68476