Y
Y
Yuriy2017-01-23 17:16:05
Less
Yuriy, 2017-01-23 17:16:05

Separating variables from style files in less?

Tell me what the hell, I moved the
global variables to a separate file, global.less in the style.less file I import this file and other
style.less

@import "global";
@import "users/style";

when building gulp less
I get messages
Potentially unhandled rejection [2] variable @base-color-text is undefined in file ....

users/style - the same imports other less files into itself.. in these tables, variables from global are used, it turns out that the variables are not available..
but after assembly, the styles still have these variables.. for example, in the global @base-color-text: blue;
in users/style nav a{color:blue}
you need to specify in each file @import "global";??
I don't understand how variable scope works

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