Closed agriffis closed 2 years ago
I have the same problem with & :not(:last-child)
. Also tested with some other selectors.
Context: In my case (https://github.com/vrk-kpa/suomifi-ui-components/blob/v7.0.0-beta.1/src/core/Form/FilterInput/FilterInput.baseStyles.tsx#L39) I'm trying to add separator between items. But after minification the selector matches to the parent element instead of the items.
Fixed by #376 and released in v2.0.7
There's a bug reported against SWC because it works differently from this plugin, but AFAICT the bug is in the plugin, not SWC.
Report: https://github.com/vercel/next.js/issues/30802#issuecomment-990960985 My response: https://github.com/vercel/next.js/issues/30802#issuecomment-992766906
Basically when the minifier encounters
.globalClass & ::after
it kills the space between the ampersand and the colons.