N
N
nurise2014-02-20 21:47:31
Less
nurise, 2014-02-20 21:47:31

How to solve import problem in less?

There is such a design. Variables are taken from the included file.

@import "@{helpers-folder}/normalize.css";
@import "@{helpers-folder}/mixins.less";

The first file is connected normally. On the second swears
NameError: variable @helpers-folder is undefined in

Compiling in Koala.
What could be the problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Meketyuk, 2014-02-20
@SergeiMeketyuk

And if the variable is set like this:
And the import is like this:

@import url(~"@{helpers-folder}/normalize.less");
@import url(~"@{helpers-folder}/mixins.less");

A
aen, 2014-02-21
@aen

Did a similar situation on grunt'e - everything worked. Try a different compiler. Koala sometimes gave out strange errors too (I don’t remember now). Switched to grunt and no problems.
Moreover, in the docks there is an example:

// Variables
@themes: "../../src/themes";

// Usage
@import "@{themes}/tidal-wave.less";

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question