Skip to content

Instantly share code, notes, and snippets.

@jonnybojangles
jonnybojangles / gist:5920859
Last active December 19, 2015 07:48 — forked from courtsimas/gist:1167053
I place this function atop my main/primary SASS file for all modules with in a site or project. When multiple modules are combined in a layout the main/primary styles are not duplicated each time. Thanks to user courtsimas and !default http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#variable_defaults_
$imported-once-files: () !default;
@function import-once($name) {
@if index($imported-once-files, $name) {
@return false;
}
$imported-once-files: append($imported-once-files, $name);
@return true;
}