-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Extend within (reference) imported files. #1851
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
Comments
This is just how |
I think its a bug, but would need to work out what's causing it to be sure. |
Ah., sorry, my bad. I did miss that with the one level |
I think that the expected output in the above should be:
|
You're right. That is a typo in my example. I will fix this. |
as far as i understood, the problem also occurs without nesting:
with testextend.less contains:
will be compiled into:
Where i expected no output at all. Tested with 1.6.3 and 1.7.0 |
Any progress on this and the related issues? |
@lukeapage Any chance to get this fixed for version 2.0.0? This would be incredible useful if you distribute very modular files via npm or Bower. |
Im not going to delay v2 till this is fixed... It might be easy to fix though.. |
I would create a test case, then debug extend visitor, look at where it creates the new selector and make sure its referenced field is only set to true if the extend is referenced (which it wont be if ibside a refrenced import). |
Thank you for the effort. |
i wonder if this issue can be fixed by using the following lines of code in parser/parser.js:
The above than should replace the lines:
|
No, because that would stop you extending the result of an extend through a |
Well, i see. Thanks.
But that left other issues with mixins in the referenced files un-fixed; mixins called from the main file (#1979) and mixins with nested selectors (#1968). Probably this rules should get the referenced state of the caller instead of that from the mixin. |
Any updates on this issue? :) |
This should be fixed by #2729 . |
Just wow! |
Re-opening, because it now compiles into .test-c {
background-color: green;
} instead of .test-c {
color: red;
}
.test-c {
background-color: green;
} |
Okay, if you get a fix for it, we can do a bugfix release soon. |
Say I have three files:
What I expect, if I compile
fileC.less
(comments only to aid the understanding):What I get:
.test-b
leaks in!The text was updated successfully, but these errors were encountered: