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

Current "variables in import statements" limitations. #388

Open
seven-phases-max opened this issue Jan 12, 2016 · 0 comments
Open

Current "variables in import statements" limitations. #388

seven-phases-max opened this issue Jan 12, 2016 · 0 comments

Comments

@seven-phases-max
Copy link
Member

seven-phases-max commented Jan 12, 2016

Specifically #2772.

Probably it would be helpful to document that @import statement is evaluated "right away" before anything else (specifically mixins). Or, in other words, that it's a sort of "static" statement and it's evaluated exactly where it appears. E.g. when we write something like:

.mixin() {
    @import "something";
}

the code is literally equal to:

.mixin() {
    <the content of the "something" file>
}

thus mixin parameters cannot be interpolated in such import statements, because the import is unconditionally expanded/resolved at the point of the mixin definition (and not when we call/invode that mixin) when and where the mixin parameters values are yet unknown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants