0

I'm trying to import a set of files using breakpoint-sass but am getting an error

filenames.scss (Line 99: Import directives may not be used within control directives or mixins.)

The code im using is:

@include breakpoint($breakpoint2) {
  @import "path/to/sassfilename";
}

Is this even allowed? Can I import files in breakpoint? I couldn't see anything documentation to say otherwise so I'm assuming it is possible to import files instead of inlining all the css.

Qasim
  • 168
  • 1
  • 8

1 Answers1

0

You can not use import into include mixin. This is your error. You have to move the import line outside conditionals or directives.

Maybe you can create a file named _breakpoint.scss and, inside it, place your code:

//filenames.scss
@import "breakpoint";
//some imported files

//_breakpoint.scss
@import 'path/to/sassfilename';

Regards.

Mario Araque
  • 4,562
  • 3
  • 15
  • 25