M
M
Michael R.2018-07-09 10:15:00
Sass
Michael R., 2018-07-09 10:15:00

What is the correct way to insert a variable into @import (SCSS)?

Greetings!
I decided to initially set default addresses to folders. Further in @importI try to display a variable with a ready address to the folder - a syntax error.
Is it even possible to specify variables in @import, and if so, how?
Thank you!

// PATH
$pathModules: 'modules';
$pathModulesStyles: #{$pathModules}'/css';

// INCLUDE MODULES
@import #{$pathModulesStyles}'/css/module-1';

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question