-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Nested parent selectors &:not(&) - 2026 #2400
Nested parent selectors &:not(&) - 2026 #2400
Conversation
color: #ff0000; | ||
} | ||
} | ||
&:nth-child(@{num}) { |
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.
[edit] extra space - its less, so just needs tidying
Congratulations on editing that code - I wrote it originally and I still find it daunting any time I have to go back and make changes, it takes time to understand. Thanks for adding the comments. Any chance you could add a comment in this PR on roughly what you changed? I've spent a while looking at it and get the basic concept, but I'm a little lost on what has changed and what hasn't. If you don't have time to do the tidyups, I can do that after pulling. |
This is the new part and it calls this new function. The rest is mostly extracting pieces of code into functions and renaming variables. New functions: The change is in
So, it would look at The last step is to pack it all back into parenthesis+selector and store into |
Bug fixed: fixed handling of multi level nesting.
…6-v1 Conflicts: lib/less/parser/parser.js lib/less/tree/ruleset.js
@lukeapage I modified the pull request. Changes:
|
Sorry about whitspace merging! Hope it wasnt too painfull.. I started |
I did not noticed. Git apparently handled that fine :) |
Nested parent selectors &:not(&) - 2026
Related to #2026 - nested parent selectors.
E.g. parent selector in following code should be replaced:
and compile into: