0

Is there a way to use variables when importing partials using SASS? Something like the following:

$version = 'MDB-4.5.14';

@import "core/" + $version + "/bootstrap/functions";

I will have multiple themes that will import portions of MDB and I don't want to have to updated all of the paths for each client every time I updated MDB.

  • Possible duplicate of [Import path using variable SASS](https://stackoverflow.com/questions/37568179/import-path-using-variable-sass) – Ben Sewards Dec 28 '18 at 19:42

1 Answers1

1

I’ve had a similar need, and when I researched in the past the answer was always the same, “it’s not possible”. The question was posed more than 7 years ago on Github and I don’t think variables in the import path has ever been implemented as part of SASS. https://github.com/sass/sass/issues/279

Vaughn D. Taylor
  • 617
  • 1
  • 8
  • 20
  • 1
    Thank you for the quick response! I was finding the same things you did. Kind of a bummer! It could be extremely useful. Thank you for affirming what I was hoping was not the case. – jsteffan Dec 28 '18 at 20:49