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

Unexpected result (with postcss-nested 5.0.2+) #31

Closed
ScottSmith95 opened this issue Jan 2, 2021 · 3 comments
Closed

Unexpected result (with postcss-nested 5.0.2+) #31

ScottSmith95 opened this issue Jan 2, 2021 · 3 comments
Assignees

Comments

@ScottSmith95
Copy link

The following input (with version 2.4.17):

@media (min-width: 50em) {
	.colophon-extended li {
		margin-bottom: 2.5rem;
		margin-bottom: var(--space-l3)
	}
}
@media (min-width: 50em) {
	.colophon-extended li img {
		margin-right: 2.5rem;
		margin-right: var(--space-l3)
	}
}
@media (min-width: 50em) {
	.container {
		max-width: 35em;
	}
}

Results in the following broken CSS:

@media (min-width: 50em) {
	margin-bottom: 2.5rem;
	margin-bottom: var(--space-l3);
	margin-right: 2.5rem;
	margin-right: var(--space-l3);

	.container {
		max-width: 35em;
	}
}
@yunusga yunusga self-assigned this Jan 3, 2021
@yunusga
Copy link
Owner

yunusga commented Jan 3, 2021

Hi, @ScottSmith95 I was not able to reproduce the problem. I need the source CSS file. It looks like you have a syntax error in CSS somewhere.

@yunusga yunusga added enhancement New feature or request and removed enhancement New feature or request labels Jan 3, 2021
@yunusga
Copy link
Owner

yunusga commented Jan 3, 2021

@ScottSmith95 i find your problem code. Issue fixed in v3.0.0. Problem with postcss-nested v5.0.2+ and async PostCSS API.

@yunusga yunusga closed this as completed Jan 3, 2021
@yunusga yunusga changed the title Unexpected result Unexpected result (with postcss-nested 5.0.2+) Jan 3, 2021
@yunusga yunusga pinned this issue Jan 3, 2021
@ScottSmith95
Copy link
Author

Ah! OK I was testing both postcss-nested and sort-media-queries and thought the issue might be with this one, not nested. Didn't realize async operation was a thing now. Appreciate your effort!

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

No branches or pull requests

2 participants