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

#130 nested edge case #131

Merged
merged 1 commit into from
Apr 12, 2023
Merged

Conversation

marapper
Copy link

@marapper marapper commented Jan 6, 2022

Real edge case for #130 is comma-separated nested selectors inside another comma separated selectors, see example test.

Fix #130

Issue is about cloning nodes after traversing so lead to loosing links to cloned children nodes. My first approach is move cloning phase in tree traverse section (in hope that postcss walks to new nodes on next iteration) and it works fine.

@marapper marapper force-pushed the master branch 3 times, most recently from ea7d392 to f879f4f Compare January 6, 2022 22:43
@marapper
Copy link
Author

marapper commented Jan 7, 2022

#58 and #110 still could be some issue with nested selectors (cssnano will merge only adjacent nodes with same rules) but still no idea how to solve it.

And actually postcss-merge-selectors can successfully merge all nested selectors successfully so maybe its not issue at all

@MadLittleMods
Copy link
Owner

Seems reasonable and given that the tests pass, good enough for me ⏩

Sorry for the review delay 🙇 Thanks for the contribution!

@MadLittleMods MadLittleMods merged commit b881aaa into MadLittleMods:master Apr 12, 2023
MadLittleMods added a commit that referenced this pull request Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nesting edge case: custom variable is not getting replaced
2 participants