Exports mixin deprecated


I recall that the exports (aka Import-once) sass function was removed in F6 when it was released. I remember reading about it, but I’m trying to find out why. I’m working on refactoring an old project, and I’m trying to create a transition plan. I’ve been searching for hours, but I must not be using the right terms.

Any help would be appreciated. Thank you!

I guess you mean sass itself.

We still use @import, see foundation-sites/foundation.scss at 258d9eb3432d7e497f41b4554f4116d5c59c92a8 · foundation/foundation-sites · GitHub

See the big warning at Sass: @import

Thanks for the reply and I appreciate the help. This is the sass module that foundation had in F5 but was deprecated in F6:

// We use this to prevent styles from being loaded multiple times for components that rely on other components.
$modules: () !default;

@mixin exports($name) {
  // Import from global scope
  $modules: $modules !global;
  // Check if a module is already on the list
  $module_index: index($modules, $name);
  @if (($module_index == null) or ($module_index == false)) {
    $modules: append($modules, $name) !global;