Last active
January 2, 2016 01:49
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin App( | |
// usual config.scss stuff with set !default values | |
){ | |
@import 'base'; | |
@import 'ui.type'; | |
@import 'ui.buttons'; | |
// ... | |
} | |
// Init | |
@include App; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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