Skip to content

Instantly share code, notes, and snippets.

@elisechant
Last active January 2, 2016 01:49
Show Gist options
  • Save elisechant/8232958 to your computer and use it in GitHub Desktop.
Save elisechant/8232958 to your computer and use it in GitHub Desktop.
Conceptual ideas for disallowed use of the SASS import directive. Throws errors: Import directives may not be used within control directives or mixins Refer to: http://sass-lang.com/documentation/file.SASS_REFERENCE.html#import
@mixin App(
// usual config.scss stuff with set !default values
){
@import 'base';
@import 'ui.type';
@import 'ui.buttons';
// ...
}
// Init
@include App;
@mixin Theme (
$theme: 'classic'
) {
@if ($theme == 'classic') {
@import 'theme-a';
}
@else {
@import 'theme-b';
}
}
@include Theme();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment