-
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
@import with variables #1108
@import with variables #1108
Conversation
Hi, that is an interesting way of doing it - one I hadn't considered. I guess that this will only support variables on the root, e.g.
and that if the variable is in an import, it also won't work?
My intent to doing this was going to be
and this would fit into 2 refactorings I would like to do in the future, but that wouldn't have to be part of this feature
If someone provides something that will be useful to people but is a smaller change I have no problem committing it as a temporary measure, as I know its taking me a while to get this done. |
Yeah, you're right, this will only work with variables defined in the root of a less file. Another point to note here: this wouldn't be able to import "yet undefined vars". For example, when I do this, it'll work:
However, I think that imports doesn't need to allow this, at least for now; heavy refactorings would be needed, don't you agree? |
"Do you think that looping thru each mixin called in the root would be very painful, or not? This way we can resolve one of the problems." Then it really starts to become a hack around doing it properly and it could have unintended side effects. "However, I think that imports doesn't need to allow this, at least for now; " If the variables are known in the file then you don't really need to use the variables in the import - this might help out some people, but I'm not sure how many. "heavy refactorings would be needed, don't you agree?" I describe the refactorings above and yes, its not trivial I would leave this here.. if I don't get variables in imports working how I'd like it done (or get another pull request with a more complete solution) then I will take another look at pulling this as an interim solution. |
So, I'm leaving this up to you. Anything else you want me to do with this pull request...? |
not at the moment. I'll definitely take a couple of the clean up commits. |
Okay then :) |
great, thats wonderful. I listen to all activity so just put a comment on an issue or feature with a proposed way of fixing if you are not sure or it is a large piece of work, then we can make sure you don't do anything un-necessarily. The current branch is 1_4_0 ;- unless we get anything serious in 1.3.3 in the next week or so I will move that to master, so work on top of that. Some feature requests we've worked out what to do, some it is still under debate. I think that everything under the milestone 1.4.0 we know what to do, but it may or may not be documented in that particular issue (many have related issues or we've spotted a pattern and have found a way to make a feature that satisfies multiple use-cases and therefore feature requests. |
Right. Can I contact you privately about less? My e-mail is in my profile. Thanks. |
@agatronic, testing this in my code the last day it seemed unstable. |
Closing this as my import-interpolation branch is now equal in functionality. |
👍 |
Hey, finally is here, done without much API changes as it was in #426.
This was discussed a lot in #410 and other issues that reference it.
This was only tested in Node. No browser, no Rhino for now.
As soon I got time to do this (currently it's 3h45 here in Brazil :/), I'll do it 👍
Thanks in advance