-
-
Notifications
You must be signed in to change notification settings - Fork 76
Fix/nested mixins reorder #1298
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
Fix/nested mixins reorder #1298
Conversation
@pciarach, I've made a few edits because the original function was quite brittle. I didn't see any new coverage from the |
Thank you @romainmenke It looks really nice. I've also added a minor change to improve readability a bit. When it comes to the additional test - you are right, the similar thing is covered by other mixin tests. |
Thank you for checking this @pciarach, As a general note, it is best to not nit changes in someone else's project for readability because readability is highly subjective. The code I wrote was in the most readable form for me and since I be maintaining it that is more important. I do appreciate the intention behind the changes 🙇 Do you mind changing it back? |
Sure, as you said you will be maintaining it so you have the last word 😉 |
This reverts commit 1b9d907.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for this @pciarach,
This is a complex feature and the test cases and pull request really helped to make it better 🎉
@romainmenke Thanks for the help and such a quick responses! |
Fixes: #1297
This is an attempt to preserve the same order of style declarations in the case of nested mixins.
I think that the previous assumption that the mixin after rules or at-rules will resolve to more rules or at-rules is mostly valid because of the CSS nesting module draft (https://drafts.csswg.org/css-nesting/#mixing). However, this draft does not cover non-standard
mixin
rules and thus should be excluded from the grouping logic.