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

Handle variants when the same class appears multiple times in a selector #10397

Merged
merged 1 commit into from Jan 23, 2023

Conversation

thecrypticace
Copy link
Contributor

Given the utility .foo.foo and the candidate hover:foo, we would replace both instances of .foo with the exact same node representing hover:foo. In postcss-selector-parser nodes effectively have identity. This meant that it would see the node at position 1 and then again at position 2 causing in an infinite loop that was allocating memory and resulted in a crash. So we clone the formatAst nodes before inserting them which results in the correct selector .hover\:foo:hover.hover\:foo:hover

Fixes #10355

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 this pull request may close these issues.

Tailwind runs out of memory in v3.2.3+ with duplicate selectors in a layer
1 participant