Answer the question
In order to leave comments, you need to log in
Less, @include and wrong urls
I used to have a big styles.less file with a structure like this:
project/ |-im/ | |- image-1.jpg | |- image-2.png | |-js/ | |-js-file-1.js | |-js-file-2.js | |-styles.css |-styles.less
div {
background: url('background.png');
}
project/ |-im/ | |- image-1.jpg | |- image-2.png | |-js/ | |-js-file-1.js | |-js-file-2.js | |-less/ | |- lib.less | |-foo.less | |-bar.less | |-styles.css |-styles.less
styles.less
:@import "less/lib";
@import "less/foo";
@import "less/bar";
less/foo.less
:div {
background: url('background.png');
}
div {
background: url('less/less/background.png');
}
Answer the question
In order to leave comments, you need to log in
Or maybe it's easier for you to move the style.less file to the less folder? Indeed, in fact, this is also a less resource file, and its transfer will in no way break the layout.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question