-
Notifications
You must be signed in to change notification settings - Fork 463
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
Error: Import directives may not be used within control directives or mixins. #1724
Comments
Error: Import directives may not be used within control directives or mixins. sass/libsass#1724
+1 |
Spec added sass/sass-spec#602 |
+1 |
@saper this error is also present when trying to |
This error isn't about what you're importing, but where you're importing. The error is telling you that you cannot use |
@xzyfer from what I understand of the associated PR's above, PR #1848 allows the use of I've just tried @saper's code in my |
This is a tricky issue, and one that LibSass doesn't get 100% correct. Technically there are two kinds of imports, Sass imports and CSS imports. What kind of import an If you're obviously importing another Sass files then it's a Sass import. Sass imports are not allowed in mixins and control directives. This is the case you're running into so the error is correct. If you're importing something from an URL or file with a This bug was regarding us incorrectly erring when CSS import (because it's a remote font url) is used in a mixin. Unfortunately it appeats this behaviour has once again broken. |
@xzyfer Ah that make sense then, thanks for the explanation! |
I've created an issue for tracking the regression in #2096 |
Reported on gitter by @safareli
Input file:
Works for Ruby Sass, libsass fails with:
The text was updated successfully, but these errors were encountered: