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

Import directives may not be used within control directives or mixins. #531

Closed
eliezerpujols opened this issue Sep 7, 2016 · 2 comments
Closed

Comments

@eliezerpujols
Copy link

CSS file:

@include breakpoint() {
  @import "header";
}

Mixin file:

@mixin breakpoint() {
   @media (min-width: 480px) {@content;}
}

Sass fails with:

events.js:141
      throw er; // Unhandled 'error' event
      ^
 Error: src\main.scss
Error: Import directives may not be used within control directives or mixins.
        on line 59 of src/main.scss
>>    @import "header";
   -----------^
@eliezerpujols
Copy link
Author

This issue was fixed in Sass Ruby: sass/libsass#1724

@xzyfer
Copy link
Collaborator

xzyfer commented Sep 7, 2016

The issue you've linked to is the same error message but different circumstances. As the error states you cannot use @import inside of a mixin. This is part of the Sass language. Issues regards the Sass language need to opened with https://github.com/sass/sass

@xzyfer xzyfer closed this as completed Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants