Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minifier removes space between & and ::after #366

Closed
agriffis opened this issue Dec 13, 2021 · 2 comments
Closed

minifier removes space between & and ::after #366

agriffis opened this issue Dec 13, 2021 · 2 comments

Comments

@agriffis
Copy link
Contributor

agriffis commented Dec 13, 2021

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: vercel/next.js#30802 (comment)
My response: vercel/next.js#30802 (comment)

Basically when the minifier encounters .globalClass & ::after it kills the space between the ampersand and the colons.

@agriffis agriffis changed the title minimizer removes space between & and ::after minifier removes space between & and ::after Dec 13, 2021
@jukkah
Copy link

jukkah commented Apr 5, 2022

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.

agriffis added a commit to agriffis/babel-plugin-styled-components that referenced this issue Apr 5, 2022
quantizor pushed a commit that referenced this issue Apr 7, 2022
@agriffis
Copy link
Contributor Author

agriffis commented Apr 7, 2022

Fixed by #376 and released in v2.0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants