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

Namespace omitted for comma-joined selectors in some scenarios #321

Closed
quantizor opened this issue Dec 22, 2023 · 2 comments · Fixed by #322
Closed

Namespace omitted for comma-joined selectors in some scenarios #321

quantizor opened this issue Dec 22, 2023 · 2 comments · Fixed by #322

Comments

@quantizor
Copy link
Contributor

Screenshot 2023-12-22 at 9 00 18 AM

Given the following:

div {
  display: flex;

  &.foo,
  p:not(:last-child) {
    background: red;
  }
}

The output is currently:

[namespace] div {
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
}

[namespace] div.foo,p:not(:last-child) {
	background: red;
}

But it should be:

[namespace] div {
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
}

[namespace] div.foo,[namespace] p:not(:last-child) {
	background: red;
}

Note the lack of [namespace] for the second selector in the comma chain.

@Andarist
Copy link
Collaborator

Andarist commented Dec 22, 2023

This is a regression from: ccb0016 (or at least it has changed between 4.0.10 and 4.0.11)

@quantizor
Copy link
Contributor Author

quantizor commented Dec 27, 2023

I think the bug is at least as old as 4.x just based on testing with this example repo https://github.com/arackaf/styled-components-repro (I'm using package.json overrides to force particular versions.) nvm unrelated

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

Successfully merging a pull request may close this issue.

2 participants