Answer the question
In order to leave comments, you need to log in
Is it possible to preset variables in sass?
Introductory:
1. There is a hierarchical build structure, in which sass are each in their own logical folder.
2. There is a config file in which variables and mixins are pre-installed
3. Files cannot be glued or included (at least part of them), they are needed as independent css files as a result of compilation.
4. Now, in order for common variables and mixins to be available in separate sass files, you have to write something like include '../../../../../../../config in each separately .sass' =)
Question: is it possible to pre-set a variable at the sass level or autoload the config file?
For example, some kind of path variable to be defined, say, at the gulp-sass level, into which to sew the absolute path to config.sass.
DECISION
It was suggested by Sergey Sergey in the comments.
In a piece of code below, we add the path where Dmitrijs Balcers will look for include files.
.pipe(sass.sync({
includePaths: [process.env['INIT_CWD']+'/assets/sass/global/']
}))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question