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

PostCSS Nesting removes semicolon #497

Closed
3 tasks done
Antonio-Laguna opened this issue Jun 23, 2022 · 1 comment · Fixed by #498
Closed
3 tasks done

PostCSS Nesting removes semicolon #497

Antonio-Laguna opened this issue Jun 23, 2022 · 1 comment · Fixed by #498

Comments

@Antonio-Laguna
Copy link
Member

Bug description

PostCSS Nesting is removing the last semicolon prior to a nested rule.

While this is valid CSS it's making parsers choke on this. In this case, it's affecting Gutenberg which has a CSS Parser

See WordPress/gutenberg#40444

Source CSS

.something {
	order: 1;

	& .foo {
		order: 2;
	}
}

Expected CSS

.something {
	order: 1;
}
.something .foo {
		order: 2;
	}

Actual CSS

.something {
	order: 1
}
.something .foo {
		order: 2;
	}

Does it happen with npx @csstools/csstools-cli <plugin-name> minimal-example.css?

Yes

Debug output

No response

Extra config

No response

What plugin are you experiencing this issue on?

PostCSS Nesting

Plugin version

10.1.8

What OS are you experiencing this on?

macOS

Node Version

16

Validations

  • Follow our Code of Conduct
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@Antonio-Laguna
Copy link
Member Author

cc @fabiankaegy

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

Successfully merging a pull request may close this issue.

1 participant